Browse Source

预约单库存品查看调整

dev-warehouse
kilo 1 year ago
parent
commit
e2afdd586d
  1. 7
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryListEntity.java
  2. 4
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java
  3. 24
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockArticleEntity.java
  4. 15
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java
  5. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionReservationDTO.java
  6. 20
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionStockArticleDTO.java
  7. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java
  8. 66
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  9. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationService.java
  10. 34
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  11. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java

7
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryListEntity.java

@ -247,6 +247,13 @@ public class DistributionDeliveryListEntity extends TenantEntity {
@ApiModelProperty(value = "定位打卡地址")
private String positioningAdr;
/**
* 定位打卡地址
*/
@ApiModelProperty(value = "定位打卡地址")
private String deliveryState;
}

4
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java

@ -24,6 +24,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import java.math.BigInteger;
/**
* 在库订单包件清单 实体类
*
@ -167,7 +169,7 @@ public class DistributionParcelListEntity extends TenantEntity {
* 品牌ID
*/
@ApiModelProperty(value = "品牌ID")
private String brandId;
private Long brandId;
/**
* 品牌名称
*/

24
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockArticleEntity.java

@ -208,12 +208,12 @@ public class DistributionStockArticleEntity extends TenantEntity {
*/
@ApiModelProperty(value = "状态;1 配送 2 待配送 3部分入库 4已入库")
private String orderStatus;
/**
* 状态;1 配送 2 待配送 3部分入库 4已入库
*/
@ApiModelProperty(value = "状态;1 配送 2 待配送 3部分入库 4已入库")
@TableField(exist = false)
private String stateName;
// /**
// * 状态;1 配送 2 待配送 3部分入库 4已入库
// */
// @ApiModelProperty(value = "状态;1 配送 2 待配送 3部分入库 4已入库")
// @TableField(exist = false)
// private String stateName;
/**
* 状态;1 已通知 2 未通知
@ -267,17 +267,9 @@ public class DistributionStockArticleEntity extends TenantEntity {
/**
* 包件数量
*/
@TableField(exist = false)
private List<DistributionParcelListEntity> packageList;
/**
* 订单是否出现包件修改
*/
@TableField(exist = false)
private Boolean isUpdate = false;
//-------------2023-07-16 新增在库订单字段

15
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java

@ -244,7 +244,7 @@ public class DistributionReservationController extends BladeController {
}
/**
* 预约列表 详情
* 查询预约单订单列表
*/
@GetMapping("/getReservationPackage")
@ApiOperationSupport(order = 1)
@ -255,7 +255,7 @@ public class DistributionReservationController extends BladeController {
}
/**
* 预约列表 详情
* 查询预约单包件信息列表
*/
@GetMapping("/getReservationPackageList")
@ApiOperationSupport(order = 1)
@ -264,4 +264,15 @@ public class DistributionReservationController extends BladeController {
R<?> reservationPackage = reservationService.getReservationPackageList(reservationId);
return reservationPackage;
}
/**
* 预约列表 详情
*/
@GetMapping("/getReservationStockListInfo")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入distrbutionReservation")
public R<?> getReservationStockListInfo(@RequestParam String reservationId) {
R<?> reservationPackage = reservationService.getReservationStockListInfo(reservationId);
return reservationPackage;
}
}

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionReservationDTO.java

@ -54,13 +54,13 @@ public class DistributionReservationDTO extends DistributionReservationEntity {
* 库存品信息列表
*/
@ApiModelProperty(value = "库存品信息列表")
private List<DistributionStockListEntity> inventoryList;
private List<DistributionStockListDTO> inventoryList;
/**
* 订单信息列表
*/
@ApiModelProperty(value = "订单信息列表")
private List<DistributionStockArticleEntity> stockArticleList;
private List<DistributionStockArticleDTO> stockArticleList;

20
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionStockArticleDTO.java

@ -16,7 +16,9 @@
*/
package com.logpm.distribution.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.logpm.distribution.entity.DistributionAddvalueEntity;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -38,12 +40,24 @@ public class DistributionStockArticleDTO extends DistributionStockArticleEntity
private String ids;
//
// /**
// * 包件信息
// */
// @ApiModelProperty(value = "包件信息")
// private List<DistributionParcelListDTO> distributionParcelListDTO;
/**
* 包件信息
* 订单是否出现包件修改
*/
@ApiModelProperty(value = "包件信息")
private List<DistributionParcelListDTO> distributionParcelListDTO;
@TableField(exist = false)
private Boolean isUpdate = false;
/**
* 包件数量
*/
@TableField(exist = false)
private List<DistributionParcelListEntity> packageList;
}

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

@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.DistributionReservationDTO;
import com.logpm.distribution.entity.DistributionReservationEntity;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.entity.DistributionStockListEntity;
import com.logpm.distribution.excel.DistributionReservationExcel;
import com.logpm.distribution.vo.DistributionReservationVO;
import com.logpm.distribution.vo.DistributionStockArticleVO;
@ -106,4 +107,11 @@ public interface DistributionReservationMapper extends BaseMapper<DistributionRe
* @return
*/
DistributionReservationEntity selectByConsignee(String k);
/**
* 查询预约单下的库存品信息
* @param reservationId
* @return
*/
List<DistributionStockListEntity> getReservationStockListInfo(@Param("reservationId") String reservationId);
}

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

@ -114,7 +114,7 @@
ldsa.customer_telephone,
ldsa.customer_address,
ldsa.genre,
ldsa.state,
ldsa.order_status,
ldsa.notification,
ldsa.fee,
ldsa.rate,
@ -422,5 +422,69 @@
</if>
</where>
</select>
<select id="getReservationStockListInfo"
resultType="com.logpm.distribution.entity.DistributionStockListEntity">
SELECT
ldsl.tenant_id,
ldsl.id,
ldsl.create_user,
ldsl.create_time,
ldsl.update_user,
ldsl.update_time,
ldsl.status,
ldsl.is_deleted,
ldsl.create_dept,
ldsl.reserve1,
ldsl.reserve2,
ldsl.reserve3,
ldsl.reserve4,
ldsl.reserve5,
ldsl.order_self_numbering,
ldsl.incoming_batch,
ldsl.service_number,
ldsl.material_id,
ldsl.description_goods,
ldsl.cargo_number,
ldsl.cargo_norms,
ldsl.cargo_unit,
ldsl.warehouse_id,
ldsl.warehouse_name,
ldsl.storage_location,
ldsl.mall_id,
ldsl.mall_code,
ldsl.mall_name,
ldsl.quantity_stock,
ldsl.store_id,
ldsl.store_code,
ldsl.store_name,
ldsl.quantity_occupied,
ldsl.outbound_quantity,
ldsl.despatch,
ldsl.stock_article_id,
ldsl.factory,
ldsl.category,
ldsl.unpack,
ldsl.parcel_list_id,
ldsl.shopping_mall,
ldsl.market_id,
ldsl.market_name,
ldsl.market_code,
ldsl.stock_list_code,
ldsl.service_type,
ldsl.pid,
ldsl.brand_name,
ldsl.brand_id,
ldsl.warehousing_time,
ldsl.unpacking_quantity,
ldsl.license_plate,
ldsl.tray_id,
ldsl.tray_name,
ldsl.sku
FROM
logpm_distribution_reservation_stocklist AS ldrs
INNER JOIN logpm_distribution_stock_list AS ldsl ON ldrs.stocklist_id = ldsl.id
WHERE
reservation_id = #{reservationId}
</select>
</mapper>

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationService.java

@ -157,4 +157,11 @@ public interface IDistributionReservationService extends BaseService<Distributio
Integer getReservationNumByReservationIdAndStockListId(Long reservationId, Long stockListId);
/**
* 查询预约单下的库存品信息
* @param reservationId
* @return
*/
R<?> getReservationStockListInfo(String reservationId);
}

34
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

@ -202,9 +202,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
//获取新增预约信息的编号
Long reservationId = reservationEntity.getId();
//货区订单列表信息
List<DistributionStockArticleEntity> stockArticleList = distributionReservationDTO.getStockArticleList();
List<DistributionStockArticleDTO> stockArticleList = distributionReservationDTO.getStockArticleList();
//获取库存品列表信息
List<DistributionStockListEntity> inventoryList = distributionReservationDTO.getInventoryList();
List<DistributionStockListDTO> inventoryList = distributionReservationDTO.getInventoryList();
//订单数量统计
AtomicInteger stockArticleCount = new AtomicInteger();
@ -252,6 +252,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
distributionReservationPackageMapper.insert(distributionReservationPackageEntity);
packageNum.getAndAdd(p.getQuantity());
p.setOrderPackageStatus(ServiceConstant.PACKAGE_STATUS_RESERVATION);
// p.setBrandId(p.getBrandId());
distributionParcelListService.updateById(p);
});
//设置订单可用数量为
@ -262,6 +263,22 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
//修改订单状态为已预约
s.setOrderStatus(ServiceConstant.ORDER_STATE_ALREADY_RESERVATION);
stockArticleCount.getAndAdd(s.getReservationNum());
DistributionStockArticleEntity stockArticleEntity = Func.copy(s, DistributionStockArticleEntity.class);
// if (stockArticleEntity.getStoreId()==-1){
//
// }
// if (stockArticleEntity.getMallId()==-1){
//
// }
// if (stockArticleEntity.getFee().equals(-1)){
//
// }
// if (stockArticleEntity.getStoreId()==-1){
//
// }
// if (stockArticleEntity.getStoreId()==-1){
//
// }
distributionStockArticleService.updateById(s);
//拼接订单自编号
arrayList.add(s.getOrderSelfNumbering());
@ -742,13 +759,13 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
AtomicReference<BigDecimal> initTotal = new AtomicReference<>(BigDecimal.ZERO);
//订单自编号拼接
HashSet<String> hashSet = new HashSet<>();
List<DistributionStockArticleEntity> stockArticleList = distributionReservationDTO.getStockArticleList();
List<DistributionStockArticleDTO> stockArticleList = distributionReservationDTO.getStockArticleList();
if (!Func.isEmpty(stockArticleList)) {
//这里判断修改内容是否存在订单信息,如果存在则进行中间表数据的重新插入
stockArticleList.forEach(s -> {
List<DistributionParcelListEntity> packageList = s.getPackageList();
AtomicInteger packageNum = new AtomicInteger();
if (packageList.size() == 0) {
if (Func.isEmpty(packageList)) {
Map<String, Object> map = new HashMap<>();
map.put("stockArticleId", s.getId());
QueryWrapper<DistributionParcelListEntity> qw = Condition.getQueryWrapper(map, DistributionParcelListEntity.class);
@ -787,7 +804,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
distributionReservationStockarticleEntity.setReservationId(distributionReservationEntity.getId());
distributionReservationStockarticleService.save(distributionReservationStockarticleEntity);
packageCount.getAndAdd(distributionReservationStockarticleEntity.getReservationNum());
//统计订单包件数量
//订单到付费用
initTotal.getAndAccumulate(new BigDecimal(s.getCollectFee().toString()), BigDecimal::add);
@ -798,7 +814,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
hashSet.add(s.getOrderSelfNumbering());
});
}
List<DistributionStockListEntity> inventoryList = distributionReservationDTO.getInventoryList();
List<DistributionStockListDTO> inventoryList = distributionReservationDTO.getInventoryList();
AtomicInteger stockListNum = new AtomicInteger();
if (!Func.isEmpty(inventoryList)) {
//重新构建预约和库存之间的关系
@ -1125,4 +1141,10 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
public Integer getReservationNumByReservationIdAndStockListId(Long reservationId, Long stockListId) {
return baseMapper.getReservationNumByReservationIdAndStockListId(reservationId,stockListId);
}
@Override
public R<?> getReservationStockListInfo(String reservationId) {
List<DistributionStockListEntity> stockListEntityList = baseMapper.getReservationStockListInfo(reservationId);
return R.data(stockListEntityList);
}
}

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java

@ -308,7 +308,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
distributionStockListEntity.setStoreCode(Optional.ofNullable(distributionStockArticleEntity.getStoreCode()).orElse(null));//门店编码
distributionStockListEntity.setStoreName(Optional.ofNullable(distributionStockArticleEntity.getStoreName()).orElse(null));//门店名称
distributionStockListEntity.setFactory(Optional.ofNullable(distributionStockArticleEntity.getFactoryTrain()).orElse(null));//工厂车次
distributionStockListEntity.setCategory(Optional.ofNullable(distributionParcelList.getBrandId()).orElse(null));//品分类
distributionStockListEntity.setCategory(Optional.ofNullable(distributionParcelList.getBrandId()).orElse(null).toString());//品分类
distributionStockListEntity.setUnpackingQuantity(0);
distributionStockListEntity.setTrayName(Optional.ofNullable(distributionParcelList.getPallet()).orElse(null));
BasicMaterialEntity materialOwnId = basicMaterialClient.getMaterialOwnId(distributionParcelList.getMaterialId());

Loading…
Cancel
Save