TWarehouseMapper.java 11 KB

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