TWarehousebillsitemsMapper.java 7.4 KB

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