Browse Source

添加查询配送司机接口

single_db
caoyizhong 1 year ago
parent
commit
c093539dba
  1. 22
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryWordVO.java
  2. 19
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
  3. 14
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java
  4. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java
  5. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  6. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java
  7. 38
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

22
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryWordVO.java

@ -0,0 +1,22 @@
package com.logpm.distribution.vo;
import lombok.Data;
import java.util.Date;
/**
* @author 12702
*/
@Data
public class DistributionDeliveryWordVO {
//配送ID
private Long id;
//配送时间
private Date taskTime;
//车次号
private String trainNumber;
//司机名称
private String driverName;
//配送种类;1-自主配送,2-三方配送
private String kind;
}

19
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java

@ -231,7 +231,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
aftersalesProcessorService.saveOrUpdateBatch(list);
}
}
if(ObjectUtil.isNotNull(aftersalesWorkOrder.getUnDecreaseImageEntityList())){
if( ObjectUtil.isNotNull(aftersalesWorkOrder.getUnDecreaseImageEntityList()) && !aftersalesWorkOrder.getUnDecreaseImageEntityList().isEmpty() ){
//图片修改
aftersalesDecreaseImageService.deleteLogic(aftersalesWorkOrder.getUnDecreaseImageEntityList());
}
@ -243,11 +243,18 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
//包件信息
List<AftersalesAbnormalPackageEntity> list = new ArrayList<>();
aftersalesWorkOrder.getPackageEntityList().forEach(i ->{
AftersalesAbnormalPackageEntity packageEntity = new AftersalesAbnormalPackageEntity();
BeanUtil.copyProperties(i,packageEntity);
packageEntity.setWorkOrderId(aftersalesWorkOrder.getId());
packageEntity.setWarehouseId(myCurrentWarehouse.getId());
list.add(packageEntity);
if(ObjectUtils.isNotNull( i.getId()) ){
//修改包件信息
// AftersalesAbnormalPackageEntity abnormalPackage = new AftersalesAbnormalPackageEntity();
aftersalesAbnormalPackageService.updateById(i);
}else{
//添加
AftersalesAbnormalPackageEntity packageEntity = new AftersalesAbnormalPackageEntity();
BeanUtil.copyProperties(i,packageEntity);
packageEntity.setWorkOrderId(aftersalesWorkOrder.getId());
packageEntity.setWarehouseId(myCurrentWarehouse.getId());
list.add(packageEntity);
}
});
if(!list.isEmpty()){
aftersalesAbnormalPackageService.saveBatch(list);

14
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java

@ -116,6 +116,20 @@ public class DistributionDeliveryListController extends BladeController {
}
/**
* 异常工单查询配送信息
*/
@GetMapping("/shippingInformation")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "异常工单查询配送信息", notes = "传入distributionDeliveryList")
public R<IPage<DistributionDeliveryWordVO>> getShippingInformation (DistributionDeliveryListDTO distributionDeliveryInfoDTO, Query query) {
IPage<DistributionDeliveryWordVO> pages = distributionDeliveryListService.getShippingInformation(Condition.getPage(query), distributionDeliveryInfoDTO);
return R.data(pages);
}
/**
* 查看订单
*/

9
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java

@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.DistributionDeliveryInfoDTO;
import com.logpm.distribution.dto.DistributionDeliveryListDTO;
import com.logpm.distribution.dto.DistributionLoadingNumDTO;
import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO;
@ -460,4 +461,12 @@ public interface DistributionDeliveryListMapper extends BaseMapper<DistributionD
* @return
*/
DistributionDeliveryListVO selectDeliveryById(Long deliveryId);
/**
* 异常工单查询配送数据
* @param page
* @param distributionDeliveryInfoDTO
* @return
*/
IPage<DistributionDeliveryWordVO> getShippingInformation(IPage<Object> page,@Param("param") DistributionDeliveryListDTO distributionDeliveryInfoDTO);
}

9
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml

@ -49,7 +49,16 @@
<update id="updateloadingTimeById">
UPDATE logpm_distribution_delivery_list lddl SET lddl.loading_time = now(),lddl.delivery_status = 1 WHERE lddl.id = #{id} and lddl.loading_time is null
</update>
<!-- 异常工单查询数据 -->
<select id="getShippingInformation" resultType="com.logpm.distribution.vo.DistributionDeliveryWordVO">
select lddl.id,lddl.task_time taskTime,lddl.train_number trainNumber,lddl.kind
from logpm_distribution_delivery_list lddl
<where>
lddl.is_deleted = 0
<if test="param.trainNumber != null and param.trainNumber != ''"> and lddl.train_number like concat('%', #{ param.trainNumber },'%')</if>
</where>
</select>
<delete id="deleteDeliveryListById">
DELETE FROM logpm_distribution_delivery_list
<where>

9
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java

@ -16,7 +16,6 @@
*/
package com.logpm.distribution.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.aftersales.vo.AftersalesAbnormalPackageVO;
@ -369,6 +368,14 @@ public interface IDistributionDeliveryListService extends BaseService<Distributi
*/
List<AftersalesAbnormalPackageVO> aftersalesPackageScan(Long deliveryId, String scanBarCode);
/**
* 工单查询配送信息
* @param page
* @param distributionDeliveryInfoDTO
* @return
*/
IPage<DistributionDeliveryWordVO> getShippingInformation(IPage<Object> page, DistributionDeliveryListDTO distributionDeliveryInfoDTO);
/**
* 查询签收预约客户包件信息
* @param reservationId

38
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -5966,6 +5966,44 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
return aftersalesAbnormalPackageVOS;
}
/**
*
* 工单查询配送数据
* @param page
* @param distributionDeliveryInfoDTO
* @return
*/
@Override
public IPage<DistributionDeliveryWordVO> getShippingInformation(IPage<Object> page, DistributionDeliveryListDTO distributionDeliveryInfoDTO) {
IPage<DistributionDeliveryWordVO> iPage= baseMapper.getShippingInformation(page,distributionDeliveryInfoDTO);
if(!iPage.getRecords().isEmpty()){
iPage.getRecords().forEach( i ->{
if("1".equals(i.getKind())){
//自主
//查询司机信息
List<DistributionDeliverySelfEntity> distributionDeliverySelfEntities = distributionDeliverySelfMapper.selectList(Wrappers.<DistributionDeliverySelfEntity>query().lambda()
.eq(DistributionDeliverySelfEntity::getDeliveryId, i.getId())
);
if(!distributionDeliverySelfEntities.isEmpty()){
String collect = distributionDeliverySelfEntities.stream().map(DistributionDeliverySelfEntity::getDriverName).collect(Collectors.joining(","));
i.setDriverName(collect);
}
}else{
//三方
List<DistributionDeliveryTripartiteEntity> list = distributionDeliveryTripartiteService.list(Wrappers.<DistributionDeliveryTripartiteEntity>query().lambda()
.eq(DistributionDeliveryTripartiteEntity::getDeliveryId, i.getId())
);
if(!list.isEmpty()){
String collect = list.stream().map(DistributionDeliveryTripartiteEntity::getDriverName).collect(Collectors.joining(","));
i.setDriverName(collect);
}
}
});
}
return iPage;
}
public Map<String, String> getDriverCar(String kind, Long deliveryListEntityId) {
Map<String, String> map = new HashMap<>();

Loading…
Cancel
Save