|
@@ -36,11 +36,13 @@ import com.sckw.transport.api.model.dto.RWaybillOrderDto;
|
|
|
import com.sckw.transport.api.model.param.ContractSignLogisticsParam;
|
|
import com.sckw.transport.api.model.param.ContractSignLogisticsParam;
|
|
|
import com.sckw.transport.api.model.param.LogisticsOrderParam;
|
|
import com.sckw.transport.api.model.param.LogisticsOrderParam;
|
|
|
import com.sckw.transport.api.model.vo.KwtLogisticsOrderVO;
|
|
import com.sckw.transport.api.model.vo.KwtLogisticsOrderVO;
|
|
|
|
|
+import com.sckw.transport.api.model.vo.RTruckMonitorVo;
|
|
|
import com.sckw.transport.api.model.vo.RWaybillOrderVo;
|
|
import com.sckw.transport.api.model.vo.RWaybillOrderVo;
|
|
|
import com.sckw.transport.dao.*;
|
|
import com.sckw.transport.dao.*;
|
|
|
import com.sckw.transport.model.*;
|
|
import com.sckw.transport.model.*;
|
|
|
import com.sckw.transport.service.CommonService;
|
|
import com.sckw.transport.service.CommonService;
|
|
|
import jakarta.annotation.Resource;
|
|
import jakarta.annotation.Resource;
|
|
|
|
|
+import jodd.util.StringUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.dubbo.config.annotation.DubboReference;
|
|
import org.apache.dubbo.config.annotation.DubboReference;
|
|
|
import org.apache.dubbo.config.annotation.DubboService;
|
|
import org.apache.dubbo.config.annotation.DubboService;
|
|
@@ -624,4 +626,60 @@ public class TransportDubboServiceImpl implements TransportDubboService {
|
|
|
|
|
|
|
|
return waybillOrderVos;
|
|
return waybillOrderVos;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @param checkEntId 托运企业ID
|
|
|
|
|
+ * @desc 查询托运方关联任务中的车辆
|
|
|
|
|
+ * @author zk
|
|
|
|
|
+ * @date 2023/10/8
|
|
|
|
|
+ **/
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public List<RTruckMonitorVo> truckInTask(Long checkEntId) {
|
|
|
|
|
+ //查询物流订单
|
|
|
|
|
+ List<Long> orderIds = new ArrayList<>();
|
|
|
|
|
+ Map<String, Object> params = new HashMap<>(Global.NUMERICAL_SIXTEEN){{
|
|
|
|
|
+ put("status", LogisticsOrderEnum.IN_TRANSIT.getCode());
|
|
|
|
|
+ put("checkEntId", checkEntId);
|
|
|
|
|
+ }};
|
|
|
|
|
+ List<KwtLogisticsOrder> orders = logisticsOrderMapper.findLogisticsOrder(params);
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(orders)) {
|
|
|
|
|
+ List<Long> idList = new ArrayList<>();
|
|
|
|
|
+ orders.forEach(order -> idList.add(order.getId()));
|
|
|
|
|
+ orderIds.addAll(idList);
|
|
|
|
|
+ findLogisticsOrderChild(orderIds, StringUtil.join(idList, Global.COMMA));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //查询运单
|
|
|
|
|
+ List<RTruckMonitorVo> trucks = new ArrayList<>();
|
|
|
|
|
+ params = new HashMap<>(Global.NUMERICAL_SIXTEEN){{
|
|
|
|
|
+ put("busStatus", Global.NUMERICAL_THREE);
|
|
|
|
|
+ put("lOrderIds", StringUtil.join(orderIds, Global.COMMA));
|
|
|
|
|
+ }};
|
|
|
|
|
+ List<KwtWaybillOrder> waybillOrders = waybillOrderDao.findWaybillOrder(params);
|
|
|
|
|
+ waybillOrders.forEach(order -> trucks.add(new RTruckMonitorVo(order.getEntId(), order.getTruckNo(), Global.NUMERICAL_ONE)));
|
|
|
|
|
+ return trucks;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @param orderIds 物流订单ID集合
|
|
|
|
|
+ * @param ids 当前物流订单ID
|
|
|
|
|
+ * @desc 查询下级分包 物流订单
|
|
|
|
|
+ * @author zk
|
|
|
|
|
+ * @date 2023/10/8
|
|
|
|
|
+ **/
|
|
|
|
|
+ public void findLogisticsOrderChild(List<Long> orderIds, String ids) {
|
|
|
|
|
+ Map<String, Object> params = new HashMap<>(Global.NUMERICAL_SIXTEEN){{
|
|
|
|
|
+ put("status", LogisticsOrderEnum.IN_TRANSIT.getCode());
|
|
|
|
|
+ put("pid", ids);
|
|
|
|
|
+ }};
|
|
|
|
|
+ //查询物流订单
|
|
|
|
|
+ List<KwtLogisticsOrder> orders = logisticsOrderMapper.findLogisticsOrder(params);
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(orders)) {
|
|
|
|
|
+ List<Long> idList = new ArrayList<>();
|
|
|
|
|
+ orders.forEach(order -> idList.add(order.getId()));
|
|
|
|
|
+ orderIds.addAll(idList);
|
|
|
|
|
+ findLogisticsOrderChild(orderIds, StringUtil.join(idList, Global.COMMA));
|
|
|
|
|
+ }
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|