diff --git a/blade-biz-common/src/main/java/org/springblade/common/constant/loading/LoadScanSigningTypeStatusConstant.java b/blade-biz-common/src/main/java/org/springblade/common/constant/loading/LoadScanSigningTypeStatusConstant.java index 0922121a2..c603f9e9e 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/constant/loading/LoadScanSigningTypeStatusConstant.java +++ b/blade-biz-common/src/main/java/org/springblade/common/constant/loading/LoadScanSigningTypeStatusConstant.java @@ -7,7 +7,7 @@ package org.springblade.common.constant.loading; */ public enum LoadScanSigningTypeStatusConstant { - sijiqianshou("司机签收",1), + sijiqianshou("司机扫描签收",1), sijipiliangqianshou("司机批量签收",2), wenyuanpiliangqianshou("文员批量签收",3); diff --git a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataDriverArteryVO.java b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataDriverArteryVO.java index cc0b60a30..72de2c0ae 100644 --- a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataDriverArteryVO.java +++ b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataDriverArteryVO.java @@ -42,6 +42,8 @@ public class BasicdataDriverArteryVO extends BasicdataDriverArteryEntity { @ApiModelProperty(value = "车辆信息") private String bindVehicles; + private String carNumbers; + /** * 司机关联车辆列表 */ diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java index 1b0f7cef6..9aa7df879 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java @@ -146,6 +146,10 @@ public class DistributionParcelListVO extends DistributionParcelListEntity { @TableField(exist = false) private String signingUser; + @ApiModelProperty(value = "签收人") + @TableField(exist = false) + private String signingType; + /** * 预约号 */ diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataDriverArteryClient.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataDriverArteryClient.java index c88cda213..a40942a87 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataDriverArteryClient.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataDriverArteryClient.java @@ -22,15 +22,18 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.logpm.basicdata.entity.BasicdataDriverArteryEntity; import com.logpm.basicdata.mapper.BasicdataDriverArteryMapper; import com.logpm.basicdata.service.IBasicdataDriverArteryService; +import com.logpm.basicdata.vo.BasicdataDriverArteryVO; import lombok.AllArgsConstructor; import org.springblade.core.mp.support.BladePage; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.utils.StringUtil; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import springfox.documentation.annotations.ApiIgnore; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; /** @@ -69,14 +72,21 @@ public class BasicdataDriverArteryClient implements IBasicdataDriverArteryClient @Override public List findDriverListByName(String driverName) { - List ls = basicdataDriverArteryService.findDriverListByName(driverName); + List ls = basicdataDriverArteryService.findDriverListByName(driverName); List list = new ArrayList<>(); - for (BasicdataDriverArteryEntity driverArteryEntity:ls){ + for (BasicdataDriverArteryVO driverArteryEntity:ls){ JSONObject jsonObject = new JSONObject(); jsonObject.put("driverId",driverArteryEntity.getId()); jsonObject.put("driverName",driverArteryEntity.getName()); jsonObject.put("driverPhone",driverArteryEntity.getPhone()); jsonObject.put("driverType",driverArteryEntity.getType()); + String carNumbers = driverArteryEntity.getCarNumbers(); + List carNumberList = new ArrayList<>(); + if(StringUtil.isNotBlank(carNumbers)){ + String[] split = carNumbers.split(","); + carNumberList.addAll(Arrays.asList(split)); + } + jsonObject.put("carNumberList",carNumberList); list.add(jsonObject); } return list; diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataDriverArteryMapper.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataDriverArteryMapper.java index 30313b661..ef8b4701a 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataDriverArteryMapper.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataDriverArteryMapper.java @@ -57,7 +57,7 @@ public interface BasicdataDriverArteryMapper extends BaseMapper selectBasicdataDictionary(); - List findDriverListByName(@Param("driverName") String driverName); + List findDriverListByName(@Param("driverName") String driverName); void updateIsdeletedByPhone(@Param("phone") String phone); diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataDriverArteryMapper.xml b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataDriverArteryMapper.xml index 3364c88b2..3045fbc95 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataDriverArteryMapper.xml +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataDriverArteryMapper.xml @@ -157,10 +157,20 @@ SELECT id,name,bind_vehicle FROM logpm_basicdata_driver_artery - + select lbda.id id, + lbda.name name, + lbda.phone phone, + lbda.type type, + group_concat(lbv.vehicle_nub) carNumbers + from logpm_basicdata_driver_artery lbda + left join logpm_basicdata_drivermiddle lbdm on lbdm.driver_id = lbda.id + left join logpm_basicdata_vehicle lbv on lbv.id = lbdm.brand_id where `name` like concat('%',#{driverName},'%') + group by lbda.id, + lbda.name, + lbda.phone, + lbda.type limit 10 SELECT - ldpl.* + DISTINCT ldpl.* FROM logpm_distribution_reservation_package ldrp join logpm_distribution_parcel_list ldpl on ldrp.parce_list_id = ldpl.id diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java index bf501967f..09f5ddf11 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java @@ -37,6 +37,7 @@ import com.logpm.distribution.wrapper.DistributionParcelListWrapper; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springblade.common.constant.common.IsOrNoConstant; +import org.springblade.common.constant.loading.LoadScanSigningTypeStatusConstant; import org.springblade.common.constant.loading.LoadingStatusConstant; import org.springblade.common.constant.order.OrderStatusConstant; import org.springblade.common.constant.orderpackage.OrderPackageLoadingStatusConstant; @@ -195,7 +196,7 @@ public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl allocationInfo = deliveryListDTO.getAllocationInfo(); + if (Strings.isBlank(deliveryListDTO.getMasterDriverName())){ + //无主司机信息 进行主司机默认赋予 + deliveryListDTO.setMasterDriverName(allocationInfo.get(0).getDriverName()); + } if (Func.isEmpty(allocationInfo)) { //这里就表示是三方配送 DistributionDeliveryTripartiteDTO tripartite = deliveryListDTO.getTripartite(); @@ -3593,7 +3597,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl allocationInfo = allocationDTO.getAllocationInfo(); + if (Strings.isBlank(allocationDTO.getMasterDriverName())){ + //无主司机信息 进行主司机默认赋予 + allocationDTO.setMasterDriverName(allocationInfo.get(0).getDriverName()); + } allocationInfo.forEach(a -> { DistributionDeliverySelfEntity distributionDeliverySelfEntity = Func.copy(a, DistributionDeliverySelfEntity.class); //设置车辆编号 diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java index e1146ed9f..6ec13746f 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java @@ -441,7 +441,7 @@ public class InComingServiceImpl implements IInComingService { String dealerName = advanceEntity.getDealerName(); String dealerCode = advanceEntity.getDealerCode(); String brand = advanceEntity.getBrand(); - if(Objects.isNull(waybillId)){ + if(!Objects.isNull(waybillId)){ WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillId(waybillId); if(!Objects.isNull(waybillEntity)){ String destinationWarehouseName = waybillEntity.getDestinationWarehouseName(); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java index 906dc99de..22e2083c2 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java @@ -4719,7 +4719,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl retentionPackageMap = retentionScanEntityList.stream().collect(Collectors.toMap(WarehouseRetentionScanEntity::getOrderPackageId, Function.identity(), (k1, k2) -> k2)); warehouseRetentionScanDTOList.forEach(rs -> { @@ -291,15 +291,14 @@ public class WarehouseRetentionRecordServiceImpl extends BaseServiceImpl>>>> rs.getConditions()={}", rs.getConditions()); - } } }); } //统计该滞留任务的包件数量 int retentionTotal = warehouseRetentionScanService.list(Wrappers.query().lambda() - .eq(WarehouseRetentionScanEntity::getDeliveryId, warehouseRetentionScanDTOS.getDeliveryId()) - .eq(WarehouseRetentionScanEntity::getRefId, warehouseRetentionScanDTOS.getId())).stream().mapToInt(WarehouseRetentionScanEntity::getRetentionQuantity).sum(); + .eq(WarehouseRetentionScanEntity::getDeliveryId, warehouseRetentionScanDTOS.getDeliveryId())).stream().mapToInt(WarehouseRetentionScanEntity::getRetentionQuantity) + .sum(); if (saveFlah.get()) { return Resp.scanSuccess("操作成功", "共计滞留" + retentionTotal + "件"); } else {