Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dist.1.3.0
pref_mail@163.com 9 months ago
parent
commit
c98519497d
  1. 5
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java
  2. 5
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockArticleVO.java
  3. 14
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryPackageExcel.java
  4. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
  5. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java
  6. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  7. 39
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  8. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java
  9. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

5
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java

@ -134,6 +134,11 @@ public class DistributionParcelListVO extends DistributionParcelListEntity {
* 签收数量
*/
private String loadingTime;
/**
* 配送车次号
*/
private String deliveryTrainNumber;
/**
* 实际装车人
*/

5
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockArticleVO.java

@ -170,6 +170,11 @@ public class DistributionStockArticleVO extends DistributionStockArticleEntity {
*/
private String isZeroString;
/**
* 是否零担显示
*/
private String reservationCode;
private Integer unreceivedQuantity;

14
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryPackageExcel.java

@ -39,6 +39,20 @@ public class DistributionDeliveryPackageExcel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 租户号
*/
@ColumnWidth(20)
@ExcelProperty("配送车次号")
private String deliveryTrainNumber;
/**
* 租户号
*/
@ColumnWidth(20)
@ExcelProperty("预约单号")
private String reservationCode;
/**
* 租户号
*/

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml

@ -929,6 +929,12 @@
<if test="paramMap.warehouseId != null and paramMap.warehouseId != ''">
and ldpl.warehouse_id = #{paramMap.warehouseId}
</if>
<if test="paramMap.warehouseIds != null ">
and ldpl.warehouse_id IN
<foreach collection="paramMap.warehouseIds" item="wItem" index="index" open="(" close=")" separator=",">
#{wItem}
</foreach>
</if>
<if test="paramMap.tenantId != null and paramMap.tenantId != ''">
and ldpl.tenant_id = #{paramMap.tenantId}
</if>

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java

@ -241,10 +241,10 @@ public interface DistributionReservationMapper extends BaseMapper<DistributionRe
/**
* 查询预约订单信息
* @param parseLong
* @param reservationId
* @return
*/
List<DistributionStockArticleVO> selectOrderInfoByReservationId(Long parseLong);
List<DistributionStockArticleVO> selectOrderInfoByReservationId(@Param("reservationId") Long reservationId);
/**
* 查询预约零担订单详情

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml

@ -1242,6 +1242,7 @@
ldrs.is_have_data,
ldsa.id AS id,
ldsa.waybill_number AS waybillNumber,
lds.reservation_code AS reservationCode,
ldrs.is_zero
FROM
logpm_distribution_reservation AS lds

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

@ -710,7 +710,11 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//更新签收表的装车数量
Integer j = distributionSignforMapper.updateloadByReservationId(loadscanEntity.getDeliveryId(), loadscanEntity.getReservationId(), loadscanEntity.getPackageNub());
//进行解托操作
Map<String,Object> info = new HashMap<>();
info.put("orderPackageCode",parcelListEntity.getOrderPackageCode());
info.put("warehouseId",myCurrentWarehouse.getId());
warehouseUpdownTypeClient.downDeliveryPackage(info);
Map<String, Object> map = new HashMap();
String distrilbutionloadingscanDTOJson = JSONObject.toJSONString(distrilbutionloadingscanDTO);
@ -736,6 +740,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
});
//extracteOrderPackageStatus(distrilbutionloadingscanDTO, parcelListEntity, myCurrentWarehouse, reservationEntity);
@ -4354,6 +4360,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
return null;
}
Long deliveryId = Long.parseLong((String) distributionDeliveryInfoDTO.get("deliveryId"));
DistributionDeliveryListEntity deliveryListEntity = this.getById(deliveryId);
//查询零担订单包件
// List<DistributionParcelNumberVO> parcelNumberVOS = baseMapper.getZeroPackageListByDeliveryId(distributionDeliveryInfoDTO.getDeliveryId());
List<DistributionStockArticleVO> deliveryStockArticleInfo = baseMapper.getDeliveryStockArticleInfo(deliveryId);
@ -4376,6 +4383,16 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
ArrayList<DistributionParcelListVO> distributionParcelListVOS = new ArrayList<>();
if (Func.isNotEmpty(reservationStockarticleEntityList)) {
List<Long> orderIds = reservationStockarticleEntityList.stream().filter(order -> order.getIsZero().equals(IsOrNoConstant.no.getValue())).map(DistributionReservationStockarticleEntity::getStockArticleId).collect(Collectors.toList());
List<Long> reservationId = reservationStockarticleEntityList.stream().map(DistributionReservationStockarticleEntity::getReservationId).collect(Collectors.toList());
Map<Long,String> map = new HashMap<>();
if (!reservationId.isEmpty()) {
for (Long l : reservationId) {
List<DistributionStockArticleVO> distributionStockArticleVOS = distributionReservationMapper.selectOrderInfoByReservationId(l);
distributionStockArticleVOS.forEach(s->{
map.put(s.getId(),s.getReservationCode());
});
}
}
if (Func.isNotEmpty(orderIds)) {
//查询该客户的非零但订单包间
IPage<DistributionParcelListEntity> parcelListEntityList = distributionReservationMapper.getReservationPackage(page, orderIds, distributionDeliveryInfoDTO);
@ -4385,6 +4402,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
List<DistributionParcelListVO> parcelListVOList = DistributionParcelListWrapper.build().listVO(parcelListEntityList.getRecords());
for (DistributionParcelListVO distributionParcelListVO : parcelListVOList) {
// log.info(">>>>>> distributionParcelListVO {}", distributionParcelListVO);
distributionParcelListVO.setDeliveryTrainNumber(deliveryListEntity.getTrainNumber());
if (!map.isEmpty()){
distributionParcelListVO.setReservationCode(map.get(distributionParcelListVO.getStockArticleId()));
}
if (Func.isNotEmpty(loadingDataMap)) {
DistributionLoadscanEntity loadscanEntity = loadingDataMap.get(distributionParcelListVO.getId());
// log.info(">>>>>> loadscanEntity {}", loadscanEntity);
@ -4608,6 +4629,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
// Long deliveryId = Long.parseLong((String) distributionDeliveryInfoDTO.get("deliveryId"));
//查询零担订单包件
// List<DistributionParcelNumberVO> parcelNumberVOS = baseMapper.getZeroPackageListByDeliveryId(distributionDeliveryInfoDTO.getDeliveryId());
DistributionDeliveryListEntity deliveryListEntity = this.getById(deliveryId);
List<DistributionStockArticleVO> deliveryStockArticleInfo = baseMapper.getDeliveryStockArticleInfo(deliveryId);
if (Func.isEmpty(deliveryStockArticleInfo)) {
log.error("配送任务订单查询异常:{}", deliveryStockArticleInfo);
@ -4628,6 +4651,16 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
ArrayList<DistributionParcelListVO> distributionParcelListVOS = new ArrayList<>();
if (Func.isNotEmpty(reservationStockarticleEntityList)) {
List<Long> orderIds = reservationStockarticleEntityList.stream().filter(order -> order.getIsZero().equals(IsOrNoConstant.no.getValue())).map(DistributionReservationStockarticleEntity::getStockArticleId).collect(Collectors.toList());
List<Long> reservationId = reservationStockarticleEntityList.stream().map(DistributionReservationStockarticleEntity::getReservationId).collect(Collectors.toList());
Map<Long,String> map = new HashMap<>();
if (!reservationId.isEmpty()) {
for (Long l : reservationId) {
List<DistributionStockArticleVO> distributionStockArticleVOS = distributionReservationMapper.selectOrderInfoByReservationId(l);
distributionStockArticleVOS.forEach(s->{
map.put(s.getId(),s.getReservationCode());
});
}
}
if (Func.isNotEmpty(orderIds)) {
//查询该客户的非零但订单包间
List<DistributionParcelListEntity> parcelListEntityList = distributionReservationMapper.getReservationPackageByDeliveryId(orderIds, deliveryId);
@ -4637,6 +4670,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
List<DistributionParcelListVO> parcelListVOList = DistributionParcelListWrapper.build().listVO(parcelListEntityList);
for (DistributionParcelListVO distributionParcelListVO : parcelListVOList) {
log.info(">>>>>> distributionParcelListVO {}", distributionParcelListVO);
distributionParcelListVO.setDeliveryTrainNumber(deliveryListEntity.getTrainNumber());
if (!map.isEmpty()){
distributionParcelListVO.setReservationCode(map.get(distributionParcelListVO.getStockArticleId()));
}
if (Func.isNotEmpty(loadingDataMap)) {
DistributionLoadscanEntity loadscanEntity = loadingDataMap.get(distributionParcelListVO.getId());
log.info(">>>>>> loadscanEntity {}", loadscanEntity);

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

@ -677,7 +677,13 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
// 获取当前登录的仓库信息
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if (ObjectUtils.isNull(myCurrentWarehouse)) {
throw new ServiceException("没有仓库信息!");
List<BasicdataWarehouseEntity> warehouseList = warehouseClient.getMyWarehouseList();
if (!warehouseList.isEmpty()) {
List<Long> warehouseIds = warehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList());
paramMap.put("warehouseIds", warehouseIds);
}
}else {
paramMap.put("warehouseId", myCurrentWarehouse.getId());
}
// 用户勾选数据的ids
Object ids = paramMap.get("ids");
@ -687,7 +693,6 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
}
String tenantId = AuthUtil.getTenantId();
paramMap.put("warehouseId", myCurrentWarehouse.getId());
paramMap.put("tenantId", tenantId);
List<DistributionParcelListExcel> list = baseMapper.exportDistributionParcelList(paramMap, idArr);

5
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -5672,6 +5672,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
log.info("执行批量保存 {}",distributionSignPrintList);
return iDistributionSignPrintService.saveBatch(distributionSignPrintList);
}
this.update(Wrappers.<DistributionSignforEntity>update().lambda()
.eq(DistributionSignforEntity::getReservationId, distributionSignfor.getReservationId())
.set(DistributionSignforEntity::getDriverSigning, "2")
.set(!Objects.isNull(distributionSignfor.getDriverRemarks()),DistributionSignforEntity::getDriverRemarks, "2")
);
}
return false;

Loading…
Cancel
Save