TWarehouseMapper.java 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. package com.ruoyi.basicData.mapper;
  2. import com.ruoyi.common.core.domain.entity.TWarehouse;
  3. import com.ruoyi.warehouseBusiness.response.InventoryQueryResponse;
  4. import com.ruoyi.warehouseBusiness.response.InventoryQueryTwoResponse;
  5. import org.apache.ibatis.annotations.Mapper;
  6. import org.apache.ibatis.annotations.Param;
  7. import org.springframework.web.bind.annotation.RequestParam;
  8. import java.math.BigDecimal;
  9. import java.util.List;
  10. import java.util.Map;
  11. /**
  12. * 仓库Mapper接口
  13. *
  14. * @author ruoyi
  15. * @date 2020-12-11
  16. */
  17. @Mapper
  18. public interface TWarehouseMapper {
  19. /**
  20. * 查询仓库
  21. *
  22. * @param fId 仓库ID
  23. * @return 仓库
  24. */
  25. public TWarehouse selectTWarehouseById(Long fId);
  26. /**
  27. * 查询仓库列表
  28. *
  29. * @param tWarehouse 仓库
  30. * @return 仓库集合
  31. */
  32. public List<TWarehouse> selectTWarehouseList(TWarehouse tWarehouse);
  33. public List<TWarehouse> selectTWarehouseLists(TWarehouse tWarehouse);
  34. public List<Map<String, Object>> appGetWarehouseList(@Param("corpId") Long corpId);
  35. /**
  36. * 新增仓库
  37. *
  38. * @param tWarehouse 仓库
  39. * @return 结果
  40. */
  41. public int insertTWarehouse(TWarehouse tWarehouse);
  42. /**
  43. * 修改仓库
  44. *
  45. * @param tWarehouse 仓库
  46. * @return 结果
  47. */
  48. public int updateTWarehouse(TWarehouse tWarehouse);
  49. /**
  50. * 删除仓库
  51. *
  52. * @param fId 仓库ID
  53. * @return 结果
  54. */
  55. public int deleteTWarehouseById(Long fId);
  56. /**
  57. * 批量删除仓库
  58. *
  59. * @param fIds 需要删除的数据ID
  60. * @return 结果
  61. */
  62. public int deleteTWarehouseByIds(Long[] fIds);
  63. /**
  64. * 检验编号唯一
  65. *
  66. * @param fNo
  67. * @return
  68. */
  69. public TWarehouse checkFNoUnique(String fNo);
  70. /**
  71. * 检验名称
  72. *
  73. * @param fNname
  74. * @return
  75. */
  76. public TWarehouse checkUFNnameUnique(String fNname);
  77. /**
  78. * 检验地址
  79. *
  80. * @param fAaddr
  81. * @return
  82. */
  83. public TWarehouse checkUFAaddrUnique(String fAaddr);
  84. /**
  85. * 根据ID查询所有子部门(正常状态)
  86. *
  87. * @param fId 部门ID
  88. * @return 子部门数
  89. */
  90. public int selectNormalChildrenDeptById(Long fId);
  91. /**
  92. * 根据ID查询所有子部门
  93. *
  94. * @param deptId 部门ID
  95. * @return 部门列表
  96. */
  97. public List<TWarehouse> selectChildrenDeptById(Long deptId);
  98. /**
  99. * 修改子元素关系
  100. *
  101. * @param depts 子元素
  102. * @return 结果
  103. */
  104. public int updateDeptChildren(@Param("depts") List<TWarehouse> depts);
  105. /**
  106. * 修改所在部门的父级部门状态
  107. *
  108. * @param tWarehouse 部门
  109. */
  110. public void updateDeptStatus(TWarehouse tWarehouse);
  111. public int updatefTotalgross(TWarehouse tWarehouse);
  112. /**
  113. * 查询库区
  114. *
  115. * @param fId 库区ID
  116. * @return 库区
  117. */
  118. public TWarehouse selectTWarehousById(Long fId);
  119. public BigDecimal selectTWarehouseFTotalgross(Long fId);
  120. public TWarehouse checkDeptNameUnique(@Param("fName") String deptName, @Param("parentId") Long parentId);
  121. /**
  122. * 是否存在子节点
  123. *
  124. * @param fId 部门ID
  125. * @return 结果
  126. */
  127. public int hasChildByfId(Long fId);
  128. /**
  129. * 查询部门是否存在用户
  130. *
  131. * @param fId 部门ID
  132. * @return 结果
  133. */
  134. public int checkDeptExistarehouse(Long fId);
  135. public int checkDeptExistWarehouseItems(Long fId);
  136. /**
  137. * 根据ids查询仓库信息
  138. *
  139. * @param ids
  140. * @return
  141. */
  142. List<TWarehouse> selectByIds(@Param("ids") List<Long> ids);
  143. /**
  144. * 懒加载树状图
  145. * @param tWarehouse
  146. * @return
  147. */
  148. List<TWarehouse> lazyList(TWarehouse tWarehouse);
  149. /**
  150. * bi大屏仓库列表
  151. *
  152. * @return 仓库集合
  153. */
  154. public List<Map<String, Object>> biWarehouseList(@Param("external") String external);
  155. public TWarehouse getWarehouseByNo(String fNo);
  156. List<Map<String, Object>> queryGoodsAccountByPageV1(@Param("warehouseCode") String warehouseCode,
  157. @Param("ownerSocialIdentifier") String ownerSocialIdentifier,
  158. @Param("ownerCode") String ownerCode,
  159. @Param("ownerName") String ownerName,
  160. @Param("goodsName") String goodsName,
  161. @Param("specifications") String specifications,
  162. @Param("producing") String producing,
  163. @Param("materialQuality") String materialQuality,
  164. @Param("level") String level,
  165. @Param("pageNo") Integer pageNo,
  166. @Param("pageSize") Integer pageSize);
  167. List<Map<String, Object>> queryGoodsAccountDetailByPageV1(@Param("warehouseCode") String warehouseCode,
  168. @Param("ownerName") String ownerName,
  169. @Param("ownerCode") String ownerCode,
  170. @Param("ownerSocialIdentifier") String ownerSocialIdentifier,
  171. @Param("goodsName") String goodsName,
  172. @Param("specifications") String specifications,
  173. @Param("producing") String producing,
  174. @Param("materialQuality") String materialQuality,
  175. @Param("level") String level,
  176. @Param("receiptDoc") String receiptDoc,
  177. @Param("billOfLading") String billOfLading,
  178. @Param("areaName") String areaName,
  179. @Param("areaCode") String areaCode,
  180. @Param("slotName") String slotName,
  181. @Param("slotCode") String slotCode,
  182. @Param("pageNo") Integer pageNo,
  183. @Param("pageSize") Integer pageSize);
  184. /**
  185. * 获取仓库详细信息
  186. */
  187. public TWarehouse getWareHouseInfo(String wareHouseId);
  188. /**
  189. * 获取最新的库存数据
  190. */
  191. Map<String, Object> getStorageInfo(String wareHouseId);
  192. /**
  193. * 库存吞吐趋势信息
  194. */
  195. List<Map<String, Object>> getTimeStorageInfo(@Param("wareHouseId") String wareHouseId,@Param("startTime") String startTime,@Param("endTime") String endTime);
  196. /**
  197. * 库存吞吐趋势信息
  198. */
  199. List<Map<String, Object>> getTimeThroughputInfo(@Param("wareHouseId") String wareHouseId,@Param("startTime") String startTime,@Param("endTime") String endTime);
  200. /**
  201. * 货物保管信息
  202. */
  203. Map<String, Object> getCargoInfo(@Param("wareHouseId")String wareHouseId,@Param("startTime") String startTime,@Param("endTime") String endTime,@Param("isPledge") String isPledge);
  204. /**
  205. * 货物保管信息
  206. */
  207. List<Map<String, Object>> getGoodsList(@Param("wareHouseId")String wareHouseId,@Param("startTime") String startTime,@Param("endTime") String endTime);
  208. /**
  209. * 仓库保管趋势
  210. */
  211. List<Map<String, Object>> getCargoInfoTrend(@Param("wareHouseId")String wareHouseId,@Param("startTime") String startTime,@Param("endTime") String endTime,@Param("FTradeModeId") String FTradeModeId);
  212. /**
  213. * 获取货物品类top值
  214. */
  215. List<Map<String, Object>> getStorageTop(@Param("wareHouseId")String wareHouseId,@Param("countType") Integer countType,@Param("topCnt") Integer topCnt);
  216. /**
  217. * 获取货物品类top值
  218. */
  219. List<Map<String, Object>> getStorageTopS(@Param("wareHouseId")String wareHouseId,@Param("countType") Integer countType,@Param("topCnt") Integer topCnt);
  220. /**
  221. * 获取货主仓库top值
  222. */
  223. List<Map<String, Object>> getGoodsTop(@Param("wareHouseId")String wareHouseId,@Param("countType") Integer countType,@Param("topCnt") Integer topCnt);
  224. /**
  225. * 过户交易信息获取
  226. */
  227. List<Map<String, Object>> getTransferTransaction(@Param("wareHouseId")String wareHouseId,@Param("startTime") String startTime,@Param("endTime") String endTime);
  228. /**
  229. * 最新的作业统计
  230. */
  231. Map<String, Object> getWorkInfo(@Param("wareHouseId")String wareHouseId,@Param("countType") String countType);
  232. /**
  233. * 作业统计趋势数据
  234. */
  235. List<Map<String, Object>> getWorkTrend(@Param("wareHouseId")String wareHouseId,@Param("startTime") String startTime,@Param("endTime") String endTime,@Param("countType") String countType);
  236. /**
  237. * 获取仓库详细信息
  238. */
  239. List<InventoryQueryResponse> inventoryQueries(@Param("ownerName")String ownerName, @Param("identifier") String identifier, @Param("numbersList") List<String > numbersList);
  240. /**
  241. * 获取仓库详细信息
  242. */
  243. List<InventoryQueryTwoResponse> inventoryQueriesV2(@Param("ownerName")String ownerName, @Param("identifier") String identifier, @Param("numbersList") List<String > numbersList, @Param("blNosList") List<String> blNosList);
  244. /**
  245. * 仓单注册指令
  246. */
  247. public int receiptRegister(@Param("ownerName") String ownerName,@Param("identifier") String identifier,@Param("numbers") String numbers);
  248. /**
  249. * 仓单解锁指令
  250. */
  251. public int receiptCancel(@Param("ownerName") String ownerName,@Param("identifier") String identifier,@Param("numbers") String numbers);
  252. TWarehouse selectByPidANDName(@Param("stringCellValue")String stringCellValue, @Param("fWarehouseid")Long fWarehouseid);
  253. }