TWarehousebillsitemsMapper.java 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  1. package com.ruoyi.warehouseBusiness.mapper;
  2. import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  3. import com.ruoyi.warehouseBusiness.domain.TWarehouseBills;
  4. import com.ruoyi.warehouseBusiness.domain.TWarehousebillsitems;
  5. import com.ruoyi.warehouseBusiness.domain.dto.WarehouseDTO;
  6. import com.ruoyi.warehouseBusiness.domain.vo.CalculateStorageFeesInfoVO;
  7. import com.ruoyi.warehouseBusiness.domain.vo.WarehouseTimeIntervalVO;
  8. import org.apache.ibatis.annotations.Param;
  9. import java.util.Date;
  10. import java.util.List;
  11. import java.util.Map;
  12. /**
  13. * 仓库明细从表Mapper接口
  14. *
  15. * @author ruoyi
  16. * @date 2020-12-11
  17. */
  18. public interface TWarehousebillsitemsMapper extends BaseMapper<TWarehousebillsitems> {
  19. /**
  20. * 查询仓库明细从表
  21. *
  22. * @param fId 仓库明细从表ID
  23. * @return 仓库明细从表
  24. */
  25. public TWarehousebillsitems selectTWarehousebillsitemsById(Long fId);
  26. /**
  27. * 查询仓库明细从表列表
  28. *
  29. * @param tWarehousebillsitems 仓库明细从表
  30. * @return 仓库明细从表集合
  31. */
  32. public List<TWarehousebillsitems> selectTWarehousebillsitemsList(TWarehousebillsitems tWarehousebillsitems);
  33. /**
  34. * 新增仓库明细从表
  35. *
  36. * @param tWarehousebillsitems 仓库明细从表
  37. * @return 结果
  38. */
  39. public int insertTWarehousebillsitems(TWarehousebillsitems tWarehousebillsitems);
  40. /**
  41. * 修改仓库明细从表
  42. *
  43. * @param tWarehousebillsitems 仓库明细从表
  44. * @return 结果
  45. */
  46. public int updateTWarehousebillsitems(TWarehousebillsitems tWarehousebillsitems);
  47. /**
  48. * 删除仓库明细从表
  49. *
  50. * @param fId 仓库明细从表ID
  51. * @return 结果
  52. */
  53. public int deleteTWarehousebillsitemsById(Long fId);
  54. /**
  55. * 批量删除仓库明细从表
  56. *
  57. * @param fIds 需要删除的数据ID
  58. * @return 结果
  59. */
  60. public int deleteTWarehousebillsitemsByIds(Long[] fIds);
  61. int deleteByFPid(Long fId);
  62. List<Map<String, Object>> selectGoodsTransferitemsList(TWarehousebillsitems tWarehousebillsitems);
  63. /**
  64. * 新增库存费计算
  65. *
  66. * @param tWarehouseBills 查询条件
  67. * @return 结果
  68. */
  69. List<Map<String, Object>> selectStorageFeeItemList(@Param("warehouse") TWarehouseBills tWarehouseBills);
  70. /**
  71. * 新增库存费计算
  72. *
  73. * @param tWarehouseBills 查询条件
  74. * @return 结果
  75. */
  76. List<CalculateStorageFeesInfoVO> selectStorageFeeItemList1(@Param("warehouse") TWarehouseBills tWarehouseBills);
  77. /**
  78. * 根据库存主表id更新 库存明细表对应状态
  79. *
  80. * @param fettle 状态
  81. * @param fPid 主表id
  82. * @return 结果
  83. */
  84. int warehouseItemFollowUpdate(@Param("fPid") Long fPid, @Param("fettle") Long fettle);
  85. int warehousebillsitemsWarehouselocidSize(@Param("fWarehouselocid") Long fPid);
  86. /**
  87. * 计算仓储费撤回根据状态判断修改对应字段
  88. *
  89. * @param billsItem
  90. * @return
  91. */
  92. int agreementApprovalRejected(TWarehousebillsitems billsItem);
  93. /**
  94. * 入库待办数
  95. */
  96. int inStock();
  97. /**
  98. * 出库待办数
  99. */
  100. int outStock();
  101. /**
  102. * 当月入库待办数
  103. */
  104. int monthInStock(@Param("timeInterval") List<String> timeInterval);
  105. /**
  106. * 当月出库待办数
  107. */
  108. int monthOutStock(@Param("timeInterval") List<String> timeInterval);
  109. public List<Map<String, Object>> selectWarehouseBusinesInList(TWarehousebillsitems billsItem);
  110. public List<Map<String, Object>> selectWarehouseBusinesOutList(TWarehousebillsitems billsItem);
  111. /**
  112. * 根据id查询明细详情数据
  113. *
  114. * @param fId
  115. * @return
  116. */
  117. public Map<String, Object> selectWarehouseItemsByPId(Long fId);
  118. /**
  119. * 根据主表id查询明细是否存在已入库、出库、货转、调拨的明细
  120. *
  121. * @param fId 主表id
  122. * @return 结果
  123. */
  124. public int selectItemFStatusByFPid(Long fId);
  125. public TWarehousebillsitems selectItemQtyByFPid(Long fPid);
  126. /**
  127. * 根据主表id查询明细状态
  128. *
  129. * @param fId
  130. * @return
  131. */
  132. public List<TWarehousebillsitems> selectItemsStatusByPid(Long fId);
  133. /**
  134. * 根据主表id查询明细最小日期
  135. *
  136. * @param fId
  137. * @return
  138. */
  139. public Date selecMinBsDateByFPid(Long fId);
  140. /**
  141. * 获取最小仓储费计算日期
  142. *
  143. * @param fPid
  144. * @return
  145. */
  146. public Date getFchargedate(Long fPid);
  147. /**
  148. * 如果是按最小入库日期计算仓储费更新其他入库明细的仓储费计算日期
  149. *
  150. * @param fPid
  151. * @param fChargedate
  152. * @return
  153. */
  154. public int warehouseItemfChargedate(@Param("fPid") Long fPid,
  155. @Param("fChargedate") Date fChargedate);
  156. /**
  157. * 更新入库明细审核状态
  158. *
  159. * @param fPid
  160. * @param fItemstatus
  161. * @return
  162. */
  163. public int warehouseItemfItemstatus(@Param("fPid") Long fPid,
  164. @Param("fItemstatus") Long fItemstatus);
  165. /**
  166. * 将出库收费明细里删除的仓储费的来源入库明细的仓储费计算截止日期更新为空
  167. *
  168. * @param fPid
  169. * @param fId
  170. * @return
  171. */
  172. public int updatefStorageFeeDeadline(@Param("fPid") Long fPid,
  173. @Param("fId") List<Long> fId);
  174. /**
  175. * 将出库收费明细里删除的仓储费的来源入库明细的仓储费计算截止日期更新为空
  176. *
  177. * @param fPid
  178. * @return
  179. */
  180. public int updatefStorageFeeDeadlinefPid(@Param("fPid") Long fPid);
  181. /**
  182. * 查询明细表箱号
  183. *
  184. * @return
  185. */
  186. public List<Map<String, Object>> selectStorageFeeItemfTruckNo();
  187. /**
  188. * 根据id查询仓储费计费日期是否发生变化
  189. *
  190. * @param ids id集合
  191. * @param chargedate 校验日期
  192. * @return
  193. */
  194. int queryChangedByFchargedate(@Param("ids") List<Long> ids, @Param("time") Date chargedate);
  195. /**
  196. * 根据id查询仓储费计费截止日期是否发生变化
  197. *
  198. * @param ids id集合
  199. * @param chargedate 校验日期
  200. * @return
  201. */
  202. int queryChangedByFstorageFeeDeadline(@Param("ids") List<Long> ids, @Param("time") Date chargedate);
  203. /**
  204. * 根据仓库主表id更新仓储费计费截止日期
  205. *
  206. * @param pId 仓库主Id
  207. * @param time 仓储费计费截止日期
  208. * @return
  209. */
  210. int updateItemStorageFeeDeadlineByPId(@Param("pId") Long pId, @Param("time") Date time);
  211. /**
  212. * 根据id集合查询是否计算过仓储费
  213. *
  214. * @param ids id集合
  215. * @param type 类型
  216. * @return
  217. */
  218. int selectIsCalculateStorageFeesByIdsOrType(@Param("ids") List<Long> ids, @Param("type") String type);
  219. /**
  220. * 根据id集合查询是否计算过仓储费
  221. *
  222. * @param ids id集合
  223. * @return
  224. */
  225. int selectIsCalculateStorageFeesByIds(@Param("ids") List<Long> ids);
  226. /**
  227. * 根据业务时间区间查询区间内出库、入库、货转、调拨明细
  228. *
  229. * @param starDate
  230. * @param endDate
  231. * @return
  232. */
  233. List<TWarehousebillsitems> selectByBsDateList(@Param("starDate") Date starDate, @Param("endDate") Date endDate);
  234. /**
  235. * 根据客户id、时间区间、状态查询仓储明细
  236. *
  237. * @param tWarehouseBills
  238. * @return
  239. */
  240. List<TWarehousebillsitems> selectListByCorpId(@Param("bills") TWarehouseBills tWarehouseBills);
  241. /**
  242. * 根据日期区间计算 仓库入库数量比较
  243. *
  244. * @param warehouseDto
  245. * @return
  246. */
  247. List<WarehouseTimeIntervalVO> selectInboundQtyByTime(@Param("dto") WarehouseDTO warehouseDto);
  248. /**
  249. * 出入库统计
  250. * @param beginDate 起始时间
  251. * @param endDate 截止时间
  252. * @param billType 单据类型
  253. * @param external 外部用户
  254. * @return
  255. */
  256. public Map<String, Object> inAndOutStockStatistics(@Param("billType") String billType,
  257. @Param("beginDate") String beginDate,
  258. @Param("endDate") String endDate,
  259. @Param("external") String external);
  260. /**
  261. * bi出入库列表
  262. *
  263. * @param billType 单据类型
  264. * @return
  265. */
  266. public List<Map<String,Object>> biInAndOutStockList(@Param("billType") String billType);
  267. }