package com.steerinfo.dil.service.impl; import com.fasterxml.jackson.databind.ObjectReader; import com.steerinfo.dil.feign.AmsFeign; import com.steerinfo.dil.feign.BmsTruckFeign; import com.steerinfo.dil.feign.IMFeign; import com.steerinfo.dil.feign.TmsTruckFeign; import com.steerinfo.dil.mapper.*; import com.steerinfo.dil.model.OmstruckOrder; import com.steerinfo.dil.model.OmstruckOrderMaterial; import com.steerinfo.dil.service.IOmstruckOrderSeparateService; import com.steerinfo.dil.util.DataChange; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.RequestBody; import java.math.BigDecimal; import java.text.SimpleDateFormat; import java.util.*; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; /** * 运输订单第二个 impl * @ author :TXF * @ time :2021/12/3 13:14 */ @Service public class OmstruckOrderSeparateServiceImpl implements IOmstruckOrderSeparateService { @Autowired private OmstruckOrderSeparateMapper omstruckOrderSeparateMapper; @Autowired AmsSaleOrderMaterialMapper amsSaleOrderMaterialMapper; @Autowired AmstruckInwardPlanMapper amstruckInwardPlanMapper; @Autowired private OmstruckOrderMapper omstruckOrderMapper; @Autowired private OmstruckOrderServiceImpl omstruckOrderService; @Autowired private TmsTruckFeign tmsTruckFeign; @Autowired OmstruckOrderMaterialMapper omstruckOrderMaterialMapper; @Autowired IMFeign imFeign; @Autowired AmsFeign amsFeign; @Autowired BmsTruckFeign bmsTruckFeign; /** * 通过线路子表路线图生成各实绩 * @param map * @return */ public int addAllSonResult(Map map){ Integer resultTotalId = DataChange.dataToBigDecimal(map.get("resultTotalId")).intValue(); Integer lineId = DataChange.dataToBigDecimal(map.get("lineId")).intValue(); int result = 0; // //通过订单id判断订单类型是否为计时,如果是计时就添加计时作业实绩 // BigDecimal orderId =DataChange.dataToBigDecimal(map.get("orderId")); // Map mesMap = amstruckInwardPlanMapper.getTypeByOrderId(orderId); // String requirementType = (String) mesMap.get("requirementType"); // if (requirementType.equals("计时")){ // //添加计时作业实绩 // tmsTruckFeign.addTimeTaskResult(map); // } //通过总实绩Id 查询关联的线路子表顺序 List> segmentList = omstruckOrderSeparateMapper.getLineMesByOrderId(lineId); Map totalIdMap = new HashMap<>(); totalIdMap.put("resultTotalId",resultTotalId); totalIdMap.put("lineId", lineId); // 遍历路段顺序号子表 int count = 0; BigDecimal lineType = (BigDecimal) segmentList.get(0).get("lineType"); if (lineType.intValue() == 4) { count++; } //存放皮重路段顺序号和毛重路段顺序号map Map tareAndGrossSegmentMap = new HashMap<>(); for (Map segmentMap : segmentList) { BigDecimal segmentSqe = (BigDecimal) segmentMap.get("segmentSqe"); String linkName = (String) segmentMap.get("linkName"); totalIdMap.put("segmentSqe",segmentSqe); // 判断是否是计毛 if (linkName.equals("计毛")) { // 如果是计量则加一 count ++; tareAndGrossSegmentMap.put("grossSegmentSqe", segmentSqe); // 有两个计量的时候则新增实绩 if (count == 2) { totalIdMap.putAll(tareAndGrossSegmentMap);//将皮重顺序号和毛重路段顺序号放进去 tmsTruckFeign.addWeightResult(totalIdMap); // 新增一次则对计数器清零 count = 0; tareAndGrossSegmentMap.clear(); // 清空毛重皮重 map result++; } } // 判断是否是计皮 if (linkName.equals("计皮")) { // 如果是计皮则加一 count ++; tareAndGrossSegmentMap.put("tareSegmentSqe", segmentSqe); // 有两个计量的时候则新增实绩 if (count == 2) { totalIdMap.putAll(tareAndGrossSegmentMap); tmsTruckFeign.addWeightResult(totalIdMap); // 新增一次则对计数器清零 count = 0; tareAndGrossSegmentMap.clear(); // 清空毛重皮重 map result++; } } // 进厂 if (linkName.equals("进厂")) { tmsTruckFeign.addEnFactoryResult(totalIdMap); result++; } // 出厂 if (linkName.equals("出厂")) { tmsTruckFeign.addLeaveFactory(totalIdMap); result++; } // 装货 if (linkName.equals("装货")) { tmsTruckFeign.addLoadResult(totalIdMap); result++; } // 卸货 if (linkName.equals("卸货")) { tmsTruckFeign.addUnloadResult(totalIdMap); result++; } // 退货 if (linkName.equals("退货")) { totalIdMap.put("returnReason", map.get("returnReason")); //退货原因 仅退货有用 totalIdMap.put("orderId", map.get("orderId")); //添加新订单ID tmsTruckFeign.addReturnGoodsResult(totalIdMap); result++; } } return result; } /** * 添加退货实绩关闭当前订单 * @param map * @return */ @Transactional public int returnOrderCloseOrder(Map map){ //通过运输订单ID关闭运输订单(修改状态为退货关闭:9) map.put("orderStatus", 9); int i = omstruckOrderSeparateMapper.updateOrderStatusByOrderNum(map); BigDecimal orderId = DataChange.dataToBigDecimal(map.get("orderId")); //查询之前订单所有的信息 Map orderMap = omstruckOrderSeparateMapper.getOmstruckOrderResult(orderId); // 获得运单信息 Map orderMessaggeMap = omstruckOrderSeparateMapper.getOrderMessagge(orderId); //添加新运输订单 运输订单号 OmstruckOrder omstruckOrder = new OmstruckOrder(); BigDecimal newOrderId = omstruckOrderMapper.selectMaxId(); // 卸货点 BigDecimal unloadPointId = (BigDecimal) orderMessaggeMap.get("unloadPointId"); omstruckOrder.setOrderId(newOrderId); omstruckOrder.setOrderType(DataChange.dataToBigDecimal(orderMessaggeMap.get("orderType"))); omstruckOrder.setLineId(DataChange.dataToBigDecimal(map.get("lineId"))); omstruckOrder.setOrderPlanId(DataChange.dataToBigDecimal(orderMessaggeMap.get("orderPlanId"))); omstruckOrder.setOrderStatus(new BigDecimal(5)); //执行中(已接收) omstruckOrder.setCapacityId(DataChange.dataToBigDecimal(orderMessaggeMap.get("capacityId"))); omstruckOrder.setOrderNumber(orderMessaggeMap.get("orderNumber") + "-1"); omstruckOrder.setOrderIssueTime(new Date()); omstruckOrder.setOrderReceiveRefuseTime(new Date()); omstruckOrder.setInsertTime(new Date()); omstruckOrder.setInsertUsername("admin"); omstruckOrder.setUnloadPointId(unloadPointId); omstruckOrderMapper.insertSelective(omstruckOrder); //添加运输订单子表 Map mesMap = new HashMap<>(); mesMap.put("orderId", newOrderId); omstruckOrderService.addOrderMaterial(orderMap, newOrderId); //添加总实绩 Integer totalId = tmsTruckFeign.addTotalResult(mesMap); // 添加各种实绩 mesMap.put("resultTotalId", totalId); mesMap.put("lineId", map.get("lineId")); mesMap.put("returnReason", map.get("returnResult")); int result = addAllSonResult(mesMap); // 推送消息给司机 pushMesToWebsocket(mesMap); return result; } /** * 发送消息到 websocket 推送消息 * orderId 订单Id * @return */ public String pushMesToWebsocket(Map map) { Map mesMap = omstruckOrderMapper.pushMesToWebsocket(map); //添加消息实体 HashMap mapp = new HashMap<>(); mapp.put("messageType", 3); mapp.put("sendPerson", "system"); mapp.put("receivePerson", mesMap.get("capacityNumber")); mapp.put("messageContent",(String) mesMap.get("orderNumber") + new Date()); mapp.put("createTime", new Date()); ArrayList list = new ArrayList<>(); list.add(mapp); //调用websocket接口推送 HashMap sendMap = new HashMap<>(); //将消息实体放入list中存到map中 sendMap.put("messages", list); String s = imFeign.sendToUser(sendMap); System.out.println(s); return s; } /** * 通过运单id查询所有实绩点 * @param orderId * @return */ public List> getOrderResult(BigDecimal orderId){ Map map = omstruckOrderSeparateMapper.getOrderMesByOrderId(orderId); int orderType = DataChange.dataToBigDecimal(map.get("orderType")).intValue(); BigDecimal resultTotalId = DataChange.dataToBigDecimal(map.get("resultTotalId")); if(orderType == 11){ return getAllOrderResult(resultTotalId); }else if(orderType == 21){ return getTimeOrderResult(resultTotalId); }else { return getNormalOrderResult(resultTotalId); } } /** * 查看正常实绩流程 * @param resultTotalId * @return */ public List> getNormalOrderResult(BigDecimal resultTotalId) { List> dataList = new ArrayList<>(20); dataList.addAll(omstruckOrderSeparateMapper.getTwoDateMes(resultTotalId)); dataList.addAll(omstruckOrderSeparateMapper.getThreeDateMes(resultTotalId)); dataList.addAll(omstruckOrderSeparateMapper.getFourDateMes(resultTotalId)); //对列表中数据路段顺序号进行排序 dataList.sort(new Comparator>() { @Override public int compare(Map o1, Map o2) { BigDecimal b1 = DataChange.dataToBigDecimal(o1.get("segmenSqe")); BigDecimal b2 = DataChange.dataToBigDecimal(o2.get("segmenSqe")); return b1.compareTo(b2); } }); return dataList; } /** * 查询运输进程,通过实绩ID * @Author TXF * @Date 2022/2/18 16:46 * @param resultTotalId * @return **/ public List> getAllOrderResult(BigDecimal resultTotalId){ //通过总实绩ID查询所有的实绩:包括进厂、出厂、计重、装卸货 List> allMesList = new ArrayList<>(20); allMesList.addAll(omstruckOrderSeparateMapper.getAllEnOutFactoryResultMesByTotalId(resultTotalId)); allMesList.addAll(omstruckOrderSeparateMapper.getAllLoadUnloadResultMesByTotalId(resultTotalId)); allMesList.addAll(omstruckOrderSeparateMapper.getAllMaoPiWeightResultMesByTotalId(resultTotalId)); //对列表中数据路段顺序号进行排序 allMesList.sort(new Comparator>() { @Override public int compare(Map o1, Map o2) { BigDecimal b1 = DataChange.dataToBigDecimal(o1.get("segmenSqe")); BigDecimal b2 = DataChange.dataToBigDecimal(o2.get("segmenSqe")); return b1.compareTo(b2); } }); return allMesList; } /** * 计时查看进程方法 * @Author TXF * @Date 2022/3/18 10:33 * @param resultTotalId * @return **/ public List> getTimeOrderResult(BigDecimal resultTotalId){ List> mapList = omstruckOrderSeparateMapper.getTimeOrderResult(resultTotalId); List> returnMap = new ArrayList<>(); if(mapList.size() == 0){ return null; }else { int sqe = 1; for (Map mesMap : mapList) { int type = DataChange.dataToBigDecimal(mesMap.get("resultTimeType")).intValue(); switch (type){ case 0: mesMap.put("linkName", "达兴门岗时间"); mesMap.put("segmenSqe", sqe ++); break; case 1: mesMap.put("linkName", "计时开始"); mesMap.put("segmenSqe", sqe ++); break; case 3: mesMap.put("linkName", "计时结束"); mesMap.put("segmenSqe", sqe ++); break; case 5: mesMap.put("linkName", "开始暂停计时"); mesMap.put("segmenSqe", sqe ++); break; case 7: mesMap.put("linkName", "结束暂停计时"); mesMap.put("segmenSqe", sqe ++); } returnMap.add(mesMap); } } return returnMap; } /** * 通过运输订单号查询实绩位置 * @param orderNumber * @return */ public List> getOrderNumberResult(String orderNumber) { String substring = orderNumber.substring(0, orderNumber.length() - 1); BigDecimal orderId = omstruckOrderSeparateMapper.getOrderIdByOrderNumber(substring); List> orderResult = getOrderResult(orderId); return orderResult; } /** * 查看承运商所属的订单 * @param mapValue * @return */ @Override public List> getInputOrderList(Map mapValue) { return omstruckOrderSeparateMapper.getInputOrderList(mapValue); } /** * 查询所有的未下发的需要分配车辆的订单 * @param map * @return */ public List> getOthersOrderMesToSend(Map map){ return omstruckOrderSeparateMapper.getOthersOrderMesToSend(map); } /** * 根据运输订单id修改运力id * @param omstruckOrder * @return */ @Override public int updateOmstruckOrder(OmstruckOrder omstruckOrder) { return omstruckOrderMapper.updateByPrimaryKeySelective(omstruckOrder); } //根据运输订单号查物资 @Override public List> getUnloadOrderMaterial(Map map) { return omstruckOrderMaterialMapper.getUnloadOrderMaterial(map); } /** * 承运商销售分派运输订单给司机 * @param mapValue * @return */ @Override public Integer addSaleTruckOrder(Map mapValue) { // Integer orderType = (Integer) mapValue.get("orderType"); Integer lineId = (Integer) mapValue.get("lineId"); // 根据lineId查询是否是钢材 BigDecimal isSteel = omstruckOrderMapper.getIsSteel(new BigDecimal(lineId)); BigDecimal dispatchId = DataChange.dataToBigDecimal(mapValue.get("dispatchId")); //通过定向派单ID查询车序号表中的priceId 价格ID BigDecimal priceId = omstruckOrderMapper.getPriceIdByDispatchId(dispatchId); String capacityNumber = (String) mapValue.get("capacityNumber"); OmstruckOrder omstruckOrder = new OmstruckOrder(); omstruckOrder.setPriceId(priceId); BigDecimal orderId = omstruckOrderMapper.selectMaxId(); Map orderIdMap = new HashMap<>(); orderIdMap.put("orderId",orderId); tmsTruckFeign.addTotalResult(orderIdMap); omstruckOrder.setOrderId(orderId); BigDecimal saleOrderMaterialId = omstruckOrderMapper.getSaleMaterialId(dispatchId); // 查询销售订单中是物资重量还是件数 List> materialMapList = omstruckOrderSeparateMapper.getWeightOrNumber(saleOrderMaterialId); omstruckOrder.setOrderPlanId(saleOrderMaterialId); String orderNumber = DataChange.generateEightDigitsNumber("WYSDD", orderId.intValue()); omstruckOrder.setOrderNumber(orderNumber); omstruckOrder.setLineId(new BigDecimal(lineId)); omstruckOrder.setOrderIssueTime(new Date()); // 如果线路类型为3或者4(危化品和焦炭)则为非钢材 if (isSteel != null && (isSteel.intValue() == 3 || isSteel.intValue() == 4)) { omstruckOrder.setOrderType(new BigDecimal(2)); } // 否则为钢材 else { omstruckOrder.setOrderType(new BigDecimal(1)); } omstruckOrder.setOrderStatus(new BigDecimal(4)); omstruckOrder.setInsertTime(new Date()); omstruckOrder.setUpdateTime(new Date()); omstruckOrder.setInsertUsername("admin"); omstruckOrder.setUpdateUsername("admin"); omstruckOrder.setInsertUpdateRemark("无"); omstruckOrder.setDeleted(new BigDecimal(0)); BigDecimal capacityId = omstruckOrderMapper.getCapacityId(capacityNumber); omstruckOrder.setCapacityId(capacityId); List> mapList = omstruckOrderMapper.getMaterialMessages(dispatchId); if (mapList != null && mapList.size() != 0) { for (Map map : mapList) { OmstruckOrderMaterial omstruckOrderMaterial = new OmstruckOrderMaterial(); BigDecimal orderMaterialId = omstruckOrderMaterialMapper.selectMaxId(); omstruckOrderMaterial.setOrderMaterialId(orderMaterialId); omstruckOrderMaterial.setOrderId(orderId); omstruckOrderMaterial.setInsertTime(new Date()); omstruckOrderMaterial.setUpdateTime(new Date()); omstruckOrderMaterial.setInsertUsername("admin"); omstruckOrderMaterial.setUpdateUsername("admin"); omstruckOrderMaterial.setInsertUpdateRemark("无"); if (map != null) { BigDecimal saleOrderMaterialNumber = (BigDecimal) map.get("saleOrderMaterialNumber"); BigDecimal materialId = (BigDecimal) map.get("materialId"); omstruckOrderMaterial.setMaterialId(materialId); // 判断是重量还是件数 if (materialMapList != null) { BigDecimal saleMaterialNumber = (BigDecimal) materialMapList.get(0).get("materialNumber"); if (saleMaterialNumber != null && saleMaterialNumber.toString().length() != 0) { omstruckOrderMaterial.setOrderMaterialNumber(saleOrderMaterialNumber); } else { omstruckOrderMaterial.setOrderMaterialWeight(saleOrderMaterialNumber); } } } omstruckOrderMaterialMapper.insertSelective(omstruckOrderMaterial); } } int result = omstruckOrderMapper.insertSelective(omstruckOrder); // 调用websocket推送数据给司机 pushMesToWebsocket(orderIdMap); return result; } @Override public int updateTimes(BigDecimal orderPlanId, int times) { return omstruckOrderSeparateMapper.updateTimes(orderPlanId, times); } /** * 根据运单id关闭运输订单 * @param orderId * @return */ @Override public int closeOrder(Integer orderId) { OmstruckOrder omstruckOrder = new OmstruckOrder(); omstruckOrder.setOrderId(new BigDecimal(orderId)); omstruckOrder.setOrderStatus(new BigDecimal(8)); int result = omstruckOrderMapper.updateByPrimaryKeySelective(omstruckOrder); return result; } /** * @Author TXF * @Date 2021/12/30 16:15 * @param capacityNumber 车牌号 * @return 查询当前车辆之前所有已完成的订单号 以及 订单ID **/ public List> getCapacityAllOrder(String capacityNumber){ return omstruckOrderSeparateMapper.getCapacityAllOrder(capacityNumber); } // @Override // public int updateTimes(BigDecimal orderPlanId, int times) { // return omstruckOrderSeparateMapper.updateTimes(orderPlanId,times); // } /** * 根据运单id查询出所有销售数据 * @param orderId * @return */ @Override public Map getSaleAllMessages(BigDecimal orderId) { // 销售订单id Map mapValue = omstruckOrderSeparateMapper.getSaleAllMessages(orderId); BigDecimal saleOrderId = (BigDecimal) mapValue.get("saleOrderId"); // 车序号 List> truckList = omstruckOrderSeparateMapper.getMaxTruckNo(saleOrderId); Map map = truckList.get(0); mapValue.putAll(map); // mapList中的数据 List> mapList = omstruckOrderSeparateMapper.getMapList(orderId); mapValue.put("mapList",mapList); return mapValue; } /** * 新增一个新的运输订单(一车多趟) * @Author TXF * @Date 2022/1/14 21:10 * @param orderId * @return **/ public int addNewTransportOrder(BigDecimal orderId){ //根据运输订单ID查询 订单信息 OmstruckOrder omstruckOrder = omstruckOrderMapper.selectByPrimaryKey(orderId); BigDecimal newOrderId = updateTruckOrder(omstruckOrder); omstruckOrderMapper.insertSelective(omstruckOrder); //通过订单ID查询物资子表信息 OmstruckOrderMaterial omstruckOrderMaterial = omstruckOrderMaterialMapper.selectByOrderIdPrimaryKey(orderId); //更新物资子表中的订单ID omstruckOrderMaterial.setOrderId(newOrderId); updateTruckOrderMaterial(omstruckOrderMaterial); omstruckOrderMaterialMapper.insertSelective(omstruckOrderMaterial); //远程调用新增新的总实绩ID Map map = new HashMap<>(); map.put("orderId", newOrderId); tmsTruckFeign.addTotalResult(map); return 1; } /** * 批量关闭运输订单 * @param mapList * @return */ @Override public int batchCloseOrder(List> mapList) { int result = 0; // 遍历主键 for (Map map : mapList) { BigDecimal orderId = DataChange.dataToBigDecimal(map.get("orderId")); OmstruckOrder omstruckOrder = new OmstruckOrder(); omstruckOrder.setOrderId(orderId); omstruckOrder.setOrderStatus(new BigDecimal(7)); result += omstruckOrderMapper.updateByPrimaryKeySelective(omstruckOrder); } return result; } /** * 更新新订单信息 (一车多趟) * @Author TXF * @Date 2022/1/14 21:35 * @param omstruckOrder * @return **/ private BigDecimal updateTruckOrder(OmstruckOrder omstruckOrder){ //设置新的运输订单号和主键 BigDecimal newOrderId = omstruckOrderMapper.selectMaxId(); omstruckOrder.setOrderId(newOrderId); omstruckOrder.setOrderNumber(DataChange.generateEightDigitsNumber("WYSDD", newOrderId.intValue())); //设置订单状态为已下发 司机未接收时间 路段顺序号 订单确认状态 omstruckOrder.setOrderStatus(new BigDecimal(4)); Date nowDate = new Date(); omstruckOrder.setOrderIssueTime(nowDate); omstruckOrder.setOrderLineSequence(null); omstruckOrder.setOrderReceiveRefuseTime(null); omstruckOrder.setDriverConfirmation(null); omstruckOrder.setOrderEntryTime(new Date(nowDate.getTime() + 7200000));//一车多趟预估进厂时间以当前时间往后推俩小时 //常规字段 omstruckOrder.setInsertTime(nowDate); omstruckOrder.setInsertUsername("admin"); omstruckOrder.setUpdateTime(null); omstruckOrder.setUpdateUsername(null); return newOrderId; //用于更新订单子表信息 } /** * 更新订单物资子表信息 (一车多趟) * @Author TXF * @Date 2022/1/14 21:40 * @param * @return **/ private void updateTruckOrderMaterial(OmstruckOrderMaterial omstruckOrderMaterial){ //更新主键 以及常规字段 omstruckOrderMaterial.setOrderMaterialId(omstruckOrderMaterialMapper.selectMaxId()); omstruckOrderMaterial.setMaterialMeassion(null); omstruckOrderMaterial.setInsertTime(new Date()); omstruckOrderMaterial.setInsertUsername("admin"); omstruckOrderMaterial.setUpdateTime(null); omstruckOrderMaterial.setUpdateUsername(null); } /** * 批量删除订单 * @Author TXF * @Date 2022/1/14 23:51 * @param * @return **/ @Transactional public int deleteOrders(Map map){ List orderIdList = (List) map.get("list"); omstruckOrderMapper.batchDelete(orderIdList); omstruckOrderMaterialMapper.batchByOrderIdDelete(orderIdList); omstruckOrderMaterialMapper.batchByOrderIdForTotalDelete(orderIdList); return orderIdList.size(); } /** * 装卸工查询自己所有装了货的订单信息 * @Author TXF * @Date 2022/1/15 17:07 * @param map * @return **/ public List> getAllLoadUnloadResult(@RequestBody(required = false) Map map){ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); map.put("limitTime", sdf.format(new Date(new Date().getTime() - 43200000))); List> allLoaderLoadingOrder = omstruckOrderSeparateMapper.getAllLoaderLoadingOrder(map); return allLoaderLoadingOrder; } @Override public List> getOrderMaterial(Integer orderId) { List>maplist = omstruckOrderMaterialMapper.getOrderMaterial(orderId); for (Mapmap:maplist ) { if(map.get("materialModel") == null){ String materialName = (String)map.get("materialName"); String materialName1 = materialName.replace("()",""); map.replace("materialName",materialName,materialName1); } } return maplist; } @Override public int closeInwardOrder(Integer orderId, Integer sqe, String resultNetWeight) { int i = omstruckOrderSeparateMapper.closeInwardOrder(orderId, sqe); Map map = omstruckOrderMapper.selectInwardTimeByOrderId(new BigDecimal(orderId)); //根据运输订单id查找需求日期是否超过一个月 if(map != null){ Date dueDate = (Date) map.get("dueTime"); //当前时间小于截至日期 long DueTime = dueDate.getTime() + 86400000; //获取当前时间 Date date = new Date(); long nowTime = date.getTime(); if (nowTime < DueTime){ //推送 i += addNewTransportOrder(new BigDecimal(orderId)); } } //根据订单ID查找需求里面的承运范围和物资 MappriceMap = omstruckOrderSeparateMapper.getPriceInfo(orderId); if(priceMap.get("rangeId") ==null){ priceMap.put("rangeId",new BigDecimal(1)); } MappriceValueMap = null; try { priceValueMap = amsFeign.getInwardPriceBy(priceMap); if(priceValueMap != null){ priceValueMap.put("netWeight", resultNetWeight); priceValueMap.put("orderId",orderId); i += bmsTruckFeign.addDetailsOrder(priceValueMap); } } catch (Exception e) { e.printStackTrace(); } return i; } //根据用户id和运输订单号查找已经计时完成的订单 @Override public List> getTimeTaskEnd(Map map) { List> getTimeTaskEndOrder = omstruckOrderSeparateMapper.getTimeTaskEndOrder(map); return getTimeTaskEndOrder; } //根据运输订单号查找运输订单详情 @Override public List> getTimeTaskEndDetail(Map map) { List> mapList=omstruckOrderMapper.getTimeTaskEndDetail(map); return mapList; } @Override public List> getUnloadOrderWarehouseName(Map map) { return omstruckOrderMaterialMapper.getUnloadOrderWarehouseName(map); } //展示暂停总时长 @Override public List> getPauseTimeTaskDetail(Integer orderId) { return omstruckOrderMapper.getPauseTimeTaskDetail(orderId); } /** * Notes:取消装剩余物资 * @Author: TXF * @DateTime: 2022/3/24 18:53 */ public int cancelLoadMaterialBySteel(BigDecimal orderId){ //将路段顺序号置为路线最大路段顺序号-1:直接到出厂阶段 return omstruckOrderSeparateMapper.cancelLoadMaterialBySteel(orderId); } }