OmstruckOrderMapper.java 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. package com.steerinfo.dil.mapper;
  2. import com.steerinfo.dil.model.OmstruckOrder;
  3. import com.steerinfo.framework.mapper.IBaseMapper;
  4. import org.apache.ibatis.annotations.Mapper;
  5. import org.apache.ibatis.annotations.Param;
  6. import org.apache.ibatis.annotations.Select;
  7. import java.math.BigDecimal;
  8. import java.util.Date;
  9. import java.util.List;
  10. import java.util.Map;
  11. @Mapper
  12. public interface OmstruckOrderMapper extends IBaseMapper<OmstruckOrder, BigDecimal> {
  13. //根据销售订单id查找销售订单信息
  14. List<Map<String, Object>> selectSaleNumberForCarrier(Integer saleOrderId);
  15. //查询已接收的焦炭发运计划
  16. List<Map<String, Object>> selectCokeDayPlanAndRecived(Map<String, Object> map);
  17. //查询已接收的水渣发运计划
  18. List<Map<String, Object>> selectWaterSlagDayPlanAndRecived(Integer carrierId);
  19. //查询所有运输订单信息 状态:3
  20. //查询所有已下发运输订单 状态:4
  21. List<Map<String, Object>> getAllTruckOrder(Map<String, Object> map);
  22. //查询最大主键Id
  23. @Select("select seq_omstruck_order.nextval from dual")
  24. BigDecimal selectMaxId();
  25. //通过运输订单Id查询运输订单号
  26. String getOrderNumberByOrderId(Integer orderId);
  27. //通过运输订单号查询运输订单ID
  28. Integer getOrderIdByOrderNumber(String orderNumber);
  29. //查询所有运力信息
  30. List<Map<String, Object>> getAllCapacity(Map<String, Object> map);
  31. //通过运力Id 或 车牌号 修改运输状态
  32. int updateCapacityByCarIdOrNum(Map<String, Object> map);
  33. int updateCapacityById(Map<String, Object> map);
  34. //通过运输订单ID 或 运输订单号 查询运力Id
  35. BigDecimal getCapacityIdByOrderOrNum(Map<String, Object> map);
  36. //通过ID获取派单时间
  37. Date getInsertTimeById(Integer orderId);
  38. //通过车牌号查询运力id
  39. BigDecimal getCapacityIdByCapacityNum(String capacityNumber);
  40. //司机接单调用接口 通过运力Id匹配 / 通过运单ID查询运单信息 APP
  41. //查询所有接单或拒绝接单的订单 PC -- 采购
  42. List<Map<String, Object>> getTruckOrderByCapacityNum(Map<String, Object> map);
  43. //查询所有接单或拒绝接单的订单 PC -- 销售
  44. List<Map<String, Object>> getSaleTruckOrderByCapacityNum(Map<String, Object> map);
  45. //查询司机所有已拒绝过的订单
  46. List<Map<String, Object>> getReceiveRefuseOrderByCapacityId(Map<String, Object> map);
  47. // 通过运输订单号或运输订单ID查询总实绩ID和订单类型
  48. Map<String, Object> getResultTotalIdByOrderNumAndId(Map<String, Object> map);
  49. // 通过运输订单Id查询运输订单子表有几种物资 :物资ID
  50. List<Integer> getMaterialIdListByOrderId(Integer orderId);
  51. // 查询实绩地点和时间
  52. List<Map<String, Object>> selectPlaceAndTime(BigDecimal orderId);
  53. //通过运单号查询运单信息
  54. List<Map<String, Object>> getOrderByOrderId(BigDecimal orderId);
  55. //通过运输订单号查询预设路径的作业点ID 及 总实绩ID
  56. Map<String, Object> getPointIdByOrderNum(Map<String, Object> map);
  57. //运输派单
  58. List<Map<String, Object>> getTransportDispatch(Map<String, Object> map);
  59. //查询已下发未接受的销售订单信息
  60. List<Map<String, Object>> getOrderUnReceive(BigDecimal orderType);
  61. //查询已下发已接受的销售订单信息
  62. List<Map<String, Object>> getOrderReceived(BigDecimal orderType);
  63. //通过销售订单物资ID查找物资理重和物资件数
  64. Map<String, Object> selectTheoreticalWeightAndMaterialNumber(Integer saleOrderMaterialId);
  65. //销售物流:展示已经形成订单的水渣发运计划
  66. List<Map<String, Object>> selectWaterSlagForOrder(Map<String, Object> map);
  67. //销售物流:展示已经形成订单的焦炭发运计划
  68. List<Map<String, Object>> selectCokeRailPlanForOrder(Map<String, Object> map);
  69. //通过车序号表id查找物资id
  70. List<Map<String, Object>> selectMaterialIdBysaleOrderMaterialId(Integer saleOrderMaterialId);
  71. //查找司机排班表信息
  72. List<Map<String, Object>> selectCapacityAndDriver(Map<String, Object> map);
  73. //通过用户id查找用户姓名
  74. String selectPersonNameByPersonnelId(Integer personnelId);
  75. //通过车牌号、承运商匹配最新的运力id
  76. BigDecimal selectCapacityId(BigDecimal carrierId, String capacityNumber);
  77. //通过运输订单ID查询数据 用于websocket推送数据
  78. Map<String, Object> pushMesToWebsocket(Map<String, Object> map);
  79. //通过物资id查询批次表匹配最新的批次,关联最新的采购订单号
  80. Map<String, Object> selectNewOrderId(Map<String, Object> map);
  81. //查询所有的收货单位
  82. List<Map<String, Object>> getReceivingUnit();
  83. //查询所有的发货单位
  84. List<Map<String, Object>> getSupplier();
  85. //通过采购订单号查找采购订单ID
  86. BigDecimal getPurchaseOrderIdByNo(String purchaseOrderNo);
  87. //App
  88. //查询主干信息
  89. Map<String, Object> getSaleTruckOrderByCapacityId(Map<String, Object> map);
  90. //查询物资信息
  91. List<Map<String, Object>> getSaleTruckOrderByCapacityNumMaterial(Map<String, Object> map);
  92. //根据发运计划id查找物资id
  93. Map<String, Object> selectMaterialIdAndWeightByDayPlanId(Integer dayPlanId);
  94. //销售模块,查看所有订单
  95. List<Map<String, Object>> selectAllOrderForSale(Map<String, Object> map);
  96. //根据车序号id查找销售订单
  97. List<Map<String, Object>> selectSaleBySaleOrderMaterialId(Integer saleOrderMaterialId);
  98. //销售:接收运输订单展示pc端界面
  99. List<Map<String, Object>> selectTransportOrderForSale(Map<String, Object> map);
  100. List<Map<String, Object>> selectTransportOrderForSale1(Map<String, Object> map);
  101. //销售:根据承运商查找承运商
  102. List<Map<String, Object>> selectSaleMaterialIdByCarrierId(Integer carrierId);
  103. //根据承运商查找销售订单
  104. List<Map<String, Object>> selectSteelSaleForCarrier(Map<String, Object> map);
  105. //根据销售订单id查找信息
  106. List<Map<String, Object>> selectInfoBySaleOrderId(Integer saleOrderId);
  107. //根据承运商查找发运计划
  108. List<Map<String, Object>> selectCokeRailPlan(Map<String, Object> map);
  109. //根据发运计划查找信息
  110. List<Map<String, Object>> selectInfoByDayPlanId(Map<String, Object> map);
  111. // 车牌号下拉
  112. List<Map<String, Object>> getDriverCapacity();
  113. // 派单信息
  114. Map<String, Object> getTruckNoDispatchMap(BigDecimal dispatchId);
  115. // 物资信息
  116. List<Map<String, Object>> getMaterialMessages(BigDecimal dispatchId);
  117. // 得到销售订单与物资中间表id
  118. BigDecimal getSaleMaterialId(BigDecimal dispatchId);
  119. // 根据车牌号查询运力id
  120. BigDecimal getCapacityId(String capacityNumber);
  121. // 根据运力id查询司机排班id
  122. BigDecimal getDriverCapacityId(BigDecimal capacityId);
  123. List<Map<String,Object>> getCapacityAndDriver(Map<String,Object> mapValue);
  124. List<BigDecimal> getNullOrNotNull(BigDecimal dispatchId);
  125. BigDecimal getInwardMaterial(BigDecimal planId);
  126. List<Map<String, Object>> getInwardOrderList(Map<String, Object> mapValue);
  127. List<Map<String, Object>> getResultList(BigDecimal driverCapacityId);
  128. Map<String, Object> sendOrderToApp(Map<String, Object> map);
  129. Map<String, Object> getSaleOrderMap(BigDecimal orderId);
  130. Map<String, Object> getSteelInwardOrderMap(BigDecimal orderId);
  131. Map<String, Object> getPurchaseOrderMap(BigDecimal orderId);
  132. Map<String, Object> getInwardOrderMap(BigDecimal orderId);
  133. //通过订单Id查询该订单下所有的物资
  134. List<Map<String,Object>> getMaterialMes(@Param("orderId") BigDecimal orderId, @Param("steelJudge") String steelJudge);
  135. //根据运输订单查询车牌号
  136. String selectCapacityNumber(BigDecimal orderId);
  137. //根据运输订单查询运输状态
  138. BigDecimal selectOrderType(BigDecimal orderId);
  139. BigDecimal selectOrderId(BigDecimal dcId);
  140. //查询采购订单数据 给司机
  141. Map<String, Object> getCGOrderMessageToApp(Map<String, Object> map);
  142. //查询内转运输订单给APP 9 10 11
  143. Map<String, Object> getNZOrderMessageToApp(Map<String, Object> map);
  144. //查询采购零星物资订单给app 12 13 14
  145. Map<String,Object> getSporadicOrder(Map<String, Object> map);
  146. //查询发运计划运输订单给APP 2 3 4
  147. Map<String, Object> getFYJHOrderMessageToApp(Map<String, Object> map);
  148. //查询销售运输订单给APP 1
  149. Map<String, Object> getXSOrderMessageToApp(Map<String, Object> map);
  150. //通过运输订单号查询运输订单类型
  151. Integer getOrderTypeByOrderNumber(@Param("orderId") BigDecimal orderId);
  152. //通过车牌号查询该车牌下所有已下发 未接收 的 订单Id (4)
  153. List<Map<String, Object>> getOrderIdListByCapacityNumber(String capacityNumber);
  154. //通过车牌号查询该车牌下所有已接收的订单ID (5)
  155. List<Integer> getReceiveOrderIdListByCapacityNum(String capacityNumber);
  156. //通过车牌号查询运输订单号和运输订单ID
  157. List<Map<String, Object>> getAllRefuseOrderNumberByCapacity(String capacityNumber);
  158. //通过运输订单Id或运输订单号查询订单类型
  159. Integer getOrderTypeByOrderId(BigDecimal orderId);
  160. // 销售中的运输订单
  161. Map<String, Object> getSaleMap(BigDecimal orderId);
  162. // 内转钢材的运输订单
  163. Map<String, Object> getSteelInwardMap(BigDecimal orderId);
  164. // 采购的运输订单
  165. Map<String, Object> getPurchaseMap(BigDecimal orderId);
  166. // 内转的运输订单
  167. Map<String, Object> getInwardMap(BigDecimal orderId);
  168. // 判断是走采购,销售还是内转
  169. List<Map<String, Object>> getResultListByCapacity(String capacityNumber);
  170. // 通过卸货点名称查询卸货点id
  171. BigDecimal getUnloadPointId(String unloadPoint);
  172. // 通过ssoId查询承运商id
  173. BigDecimal getCarrierIdBySSO(String carrierSsoId);
  174. List<Map<String, Object>> getOrderMaterialList(BigDecimal orderId);
  175. //通过订单查询趟次
  176. Map<String,Object> getSporadicOrderTimes(BigDecimal orderId);
  177. //根据运输订单id查找所有实绩id
  178. List<Map<String,Object>> getAllResultId(BigDecimal orderId);
  179. //查询订单是否确认
  180. Integer getDriverConfirmation(BigDecimal orderId);
  181. //查看当前订单最大路段顺序号 与当前订单路段顺序号
  182. Map<String, Object> getMaxLineSeqByOrderId(BigDecimal orderId);
  183. //通过订单id查询零星订单id,运力id
  184. Map<String, Object> getSporadicOrdermapAddOrder(BigDecimal orderId);
  185. //判断是否是钢材
  186. BigDecimal getIsSteel(BigDecimal lineId);
  187. //通过定向派单ID查询车序号表中的priceId
  188. BigDecimal getPriceIdByDispatchId(BigDecimal dispatchId);
  189. //
  190. // //通过订单查询趟次
  191. // Integer getSporadicOrderTimes(BigDecimal orderId);
  192. //删除计重实绩
  193. int deleteWeightResult(BigDecimal resultTotalId);
  194. //删除装货实绩
  195. int deleteLoadResult(BigDecimal resultTotalId);
  196. //删除出厂实绩
  197. int deleteLeaveResult(BigDecimal resultTotalId);
  198. //删除卸货实绩
  199. int deleteUnloadResult(BigDecimal resultTotalId);
  200. //删除进厂实绩
  201. int deleteEnResult(BigDecimal resultTotalId);
  202. //判断计时实绩是否已经存在
  203. int getTimeTaskByTotalId(BigDecimal resultTotalId);
  204. List<Map<String, Object>> getPurInwardOrderList(Map<String, Object> mapValue);
  205. Map<String, Object> selectOrderMap(BigDecimal orderId);
  206. int refuseCtrlZ(Map<String, Object> map);
  207. Map<String, Object> getInwardOrderMessageToApp(Map<String, Object> map);
  208. //计时订单
  209. Map<String, Object> getInwardTimeOrderMessageToApp(Map<String, Object> map);
  210. //根据运输订单号查找需要用车时长
  211. Map<String,Object> selectInwardTimeByOrderId(BigDecimal orderId);
  212. List<Map<String, Object>> getTimeTaskEndDetail(Map<String, Object> map);
  213. List<Map<String, Object>> getPauseTimeTaskDetail(Integer orderId);
  214. Map<String, Object> getInwardOrderMessage(Map<String, Object> map);
  215. //删除计时实绩
  216. int deleteTimeTaskByTotalId(BigDecimal resultTotalId);
  217. int closeTruckOrder(BigDecimal orderId);
  218. Map<String, Object> getSteelOrderMessageToApp(Map<String, Object> map);
  219. List<Map<String, Object>> getLoadForLoadCarResult(Map<String, Object> map);
  220. // 查询路段顺序号
  221. BigDecimal getLineSeq(BigDecimal orderId);
  222. String getCapacityNumberByCapacityId(BigDecimal capacityNumber);
  223. //销售:接收运输订单展示pc端界面
  224. List<Map<String, Object>> getDriverInfoForSale2(Map<String, Object> map);
  225. List<Map<String, Object>> getTransportOrder(Map<String, Object> mapValue);
  226. }