Browse Source

修改备货任务自提查询

training
caoyizhong 1 year ago
parent
commit
50c04f9209
  1. 8
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockEntity.java
  2. 1
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupSelfVO.java
  3. 1
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupVO.java
  4. 6
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseUpdownGoodsClient.java
  5. 19
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java
  6. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java
  7. 25
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
  8. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockMapper.xml
  9. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.java
  10. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml
  11. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java
  12. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistrilbutionBillStockService.java
  13. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java
  14. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockServiceImpl.java
  15. 131
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
  16. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillStockServiceImpl.java
  17. 11
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseUpdownGoodsClient.java

8
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockEntity.java

@ -159,6 +159,14 @@ public class DistributionStockEntity extends TenantEntity {
@ApiModelProperty(value = "备货区")
private String stockupArea;
/**
* 货位Id
*/
@ApiModelProperty(value = "货位Id")
private Long allocationId;
@ApiModelProperty(value = "货位名称")
private String allocationTitle;
@ApiModelProperty(value = "备货区Id")
private Long stockupId;

1
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupSelfVO.java

@ -21,6 +21,7 @@ public class DistributionStockupSelfVO {
private Long lwugId; // 货位ID
private Long ldsId; // 扫码ID
private Long allocationId; // 货位ID
private Long parcelListId; // 包件ID
}

1
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupVO.java

@ -41,6 +41,7 @@ public class DistributionStockupVO extends DistributionStockupEntity {
private String warehouseName; //仓库名称
//备货人
private String stockupUser;
private Long stockupId;
private String stockupStatusName;
//备货状态
private String stockupStatus;

6
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseUpdownGoodsClient.java

@ -39,6 +39,7 @@ public interface IWarehouseUpdownGoodsClient {
String API_PREFIX = "updownGoods/client";
String TOP = API_PREFIX + "/top";
String SELECTSTOCKLISTOWE = API_PREFIX + "/selectStockListOwe";
String LOCATIONINFORMATION = API_PREFIX + "/locationInformation";
// /**
// *查询包条
@ -73,4 +74,9 @@ public interface IWarehouseUpdownGoodsClient {
*/
@PostMapping(SELECTSTOCKLISTOWE)
Long selectStockListOwe(@RequestBody WarehouseUpdownGoodsEntity updownGoodsEntity);
/**
* 查询某个库存品所在的库位
*/
@PostMapping(LOCATIONINFORMATION)
WarehouseUpdownGoodsEntity getLocationInformation(@RequestBody WarehouseUpdownGoodsEntity updownGoodsEntity);
}

19
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java

@ -28,7 +28,9 @@ import com.logpm.distribution.dto.app.StockupDTO;
import com.logpm.distribution.entity.*;
import com.logpm.distribution.service.*;
import com.logpm.distribution.vo.*;
import com.logpm.warehouse.entity.WarehouseGoodsAllocationEntity;
import com.logpm.warehouse.entity.WarehouseUpdownGoodsEntity;
import com.logpm.warehouse.feign.IWarehouseGoodsAllocationClient;
import com.logpm.warehouse.feign.IWarehouseUpdownGoodsClient;
import com.logpm.warehouse.feign.IWarehouseUpdownGoodsLogClient;
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
@ -83,6 +85,7 @@ public class DistributionStockupAppController extends BladeController {
private final IDistributionReservationPackageService distributionReservationPackageService;
private final IWarehouseUpdownGoodsClient warehouseUpdownGoodsClient;
private final IWarehouseUpdownGoodsLogClient warehouseUpdownGoodsLogClient;
private final IWarehouseGoodsAllocationClient warehouseGoodsAllocationClient;
private IDistributionAsyncService distributionAsyncService;
private final RabbitTemplate rabbitTemplate;
@ -447,13 +450,16 @@ public class DistributionStockupAppController extends BladeController {
.eq(DistributionParcelListEntity::getOrderPackageCode, stockupDTO.getPacketBarCode())
);
entity.setOrderSelfNumbering(one.getOrderCode());
entity.setStockArticle(one.getStockArticleId());
entity.setCoding(packetBarCode);
// entity.setStockupArea(stockupArea);
// entity.setStockupArea(stockupArea);
entity.setStockupId(stockupId);
entity.setParcelListId(one.getId());
if (distributionStockupEntity.getTypeService().equals("3")) {
entity.setBillLadingId(reservationId);
DistributionStockupEntity byId = distributionStockupService.getById(stockupId);
entity.setStockupArea(byId.getStockupArea());
entity.setParcelListId(one.getId());
//修改包件备货状态
one.setOrderPackageStockupStatus(StockupStatusConstant.yibeihuo.getValue());
//todo 待下架操作
@ -462,6 +468,15 @@ public class DistributionStockupAppController extends BladeController {
}else{
entity.setReservationId(reservationId);
}
if(ObjectUtils.isNotNull(stockupDTO.getAllocationId())){
// warehouseUpdownGoodsClient.selectMsgBywrap();
WarehouseUpdownGoodsEntity warehouseUpdownGoodsEntity = new WarehouseUpdownGoodsEntity();
warehouseUpdownGoodsEntity.setAllocationId(stockupDTO.getAllocationId());
warehouseUpdownGoodsEntity.setAssociationValue(stockupDTO.getPacketBarCode());
WarehouseUpdownGoodsEntity locationInformation = warehouseUpdownGoodsClient.getLocationInformation(warehouseUpdownGoodsEntity);
entity.setAllocationTitle(locationInformation.getPositionCode());
entity.setAllocationId(stockupDTO.getAllocationId());
}
entity.setConditions("0");
entity.setType(2);
distributionStockService.save(entity);

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

@ -91,6 +91,9 @@ public interface DistributionParcelListMapper extends BaseMapper<DistributionPar
*/
List<PackageStockupVO> selectOrderInfoSelfList(@Param("param") StockupDTO stockupDTO);
List<PackageStockupVO> selectOrderInfoSelfAllocationList(@Param("param") StockupDTO stockupDTO);
List<PackageStockupVO> selectOrderInfoAllocationList(@Param("param") StockupDTO stockupDTO);
List<DistributionParcelListEntity> findALLNoUpShelfPackageByOrderCode(@Param("orderCode") String orderCode,@Param("orderCode") Long warehouseId);

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

@ -180,6 +180,29 @@
</if>
</where>
</select>
<select id="selectOrderInfoSelfAllocationList" resultType="com.logpm.distribution.vo.PackageStockupVO">
select DISTINCT ldpl.order_code orderCode,ldpl.order_package_code packageBarCode,ldpl.conditions goodsType,ldpl.material_name materialName,
CASE WHEN lds.id IS NULL THEN 0 ELSE 1 END AS isScan,ldpl.id parceListId,(
select GROUP_CONCAT( DISTINCT position_code)
from logpm_warehouse_updown_goods
where association_id = ldpl.id
) positionCode,lwug.allocation_id allocationId
from logpm_distribution_parcel_list ldpl
LEFT JOIN logpm_distribution_stock lds on lds.parcel_list_id = ldpl.id
LEFT JOIN logpm_warehouse_updown_goods_log lwug on lwug.association_id = ldpl.id and lwug.create_time >= DATE_SUB(NOW(), INTERVAL 10 MINUTE)
<where>
<if test="param.allocationId != null and param.allocationId != ''"> and lwug.allocation_id = #{param.allocationId} </if>
<if test="param.stockArticleId != null and param.stockArticleId != ''"> and ldpl.stock_article_id = #{param.stockArticleId} </if>
<if test="param.stockupId != null and param.stockupId != ''"> and lds.stockup_id = #{param.stockupId} </if>
<if test="param.stockArticleIdList != null ">
and ldpl.stock_article_id in
<foreach collection="param.stockArticleIdList" separator="," open="(" close=")" item="a" >
#{a}
</foreach>
</if>
</where>
</select>
<select id="getParcelListOwnSelf" resultType="com.logpm.distribution.vo.DistributionParcelListVO">
select ldpl.id id,ldpl.order_package_code orderPackageCode,ldpl.firsts,ldpl.second,ldpl.third_product thirdProduct,ldpl.material_name materialName,
@ -282,7 +305,7 @@
<where>
lds.id =#{id}
</where>-->
select ldsi.stockup_id , ldpl.id id,ldpl.order_package_code orderPackageCode,lds.type stockupStatus,ldpl.firsts,ldpl.second,ldpl.third_product thirdProduct,
select DISTINCT ldsi.stockup_id , ldpl.id id,ldpl.order_package_code orderPackageCode,lds.type stockupStatus,ldpl.firsts,ldpl.second,ldpl.third_product thirdProduct,
ldpl.material_name materialName,lds.create_time stockupDate,lds.stockup_area stockupArea,ldpl.goods_allocation goodsAllocation,ldpl.pallet
from logpm_distribution_stockup_info ldsi
LEFT JOIN logpm_distribution_reservation_package ldrp on ldrp.reservation_id = ldsi.reservation_id

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

@ -99,7 +99,7 @@
<select id="selectAllocation" resultType="com.logpm.distribution.vo.DistributionStockAllocationVO">
select lwugl.position_code,lwugl.allocation_id
from logpm_distribution_stock lds
LEFT JOIN logpm_warehouse_updown_goods_log lwugl on lds.parcel_list_id = lwugl.association_id and lwugl.binding_type = 2 and lwugl.create_time >= DATE_SUB(NOW(), INTERVAL 1 HOUR)
LEFT JOIN logpm_warehouse_updown_goods_log lwugl on lds.parcel_list_id = lwugl.association_id and lwugl.binding_type = 2 and lwugl.create_time >= DATE_SUB(NOW(), INTERVAL 10 MINUTE)
where lds.reservation_id = #{reservationId} and lds.stockup_id = #{stockupId} and lds.parcel_list_id = #{parcelListId}
GROUP BY lwugl.create_time ,lwugl.position_code,lwugl.allocation_id
LIMIT 1
@ -107,7 +107,7 @@
<select id="selectSelfAllocation" resultType="com.logpm.distribution.vo.DistributionStockAllocationVO">
select lwugl.position_code,lwugl.allocation_id
from logpm_distribution_stock lds
LEFT JOIN logpm_warehouse_updown_goods_log lwugl on lds.parcel_list_id = lwugl.association_id and lwugl.binding_type = 2 and lwugl.create_time >= DATE_SUB(NOW(), INTERVAL 1 HOUR)
LEFT JOIN logpm_warehouse_updown_goods_log lwugl on lds.parcel_list_id = lwugl.association_id and lwugl.binding_type = 2 and lwugl.create_time >= DATE_SUB(NOW(), INTERVAL 10 MINUTE)
where lds.bill_lading_id = #{reservationId} and lds.stockup_id = #{stockupId} and lds.parcel_list_id = #{parcelListId}
GROUP BY lwugl.create_time ,lwugl.position_code,lwugl.allocation_id
LIMIT 1

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.java

@ -63,5 +63,5 @@ public interface DistrilbutionBillStockMapper extends BaseMapper<DistrilbutionBi
List<DistributionStockupSelfVO> selectDistrilbutionBillPackWuSelf(@Param("reservationId")Long reservationId,@Param("stockupId") Long stockupId);
DistributionStockupSelfVO selectDistrilbutionBillOverPackWuSelf(@Param("param")StockupDTO stockupDTO);
List<DistributionStockupSelfVO> selectDistrilbutionBillOverPackWuSelf(@Param("param")StockupDTO stockupDTO);
}

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

@ -60,11 +60,11 @@
SELECT GROUP_CONCAT(lwtg.tray_code SEPARATOR ',')
FROM logpm_warehouse_tray_goods lwtg
where lwtg.association_id = ldpl.id and lwtg.association_type = 3
) trays
) trays,ldpl.id parcelListId,lwugl.id lwugId
from logpm_distribution_stockup_info ldsi
LEFT JOIN logpm_distrilbution_bill_stock ldbs on ldsi.reservation_id = ldbs.bill_lading_id
LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.stock_article_id = ldbs.stock_article_id and ldpl.order_package_grounding_status = 10
LEFT JOIN logpm_warehouse_updown_goods_log lwugl on ldpl.id = lwugl.association_id and lwugl.binding_type = 2
LEFT JOIN logpm_warehouse_updown_goods_log lwugl on ldpl.id = lwugl.association_id and lwugl.binding_type = 2 and lwugl.create_time >= DATE_SUB(NOW(), INTERVAL 10 MINUTE)
<where>
ldsi.stockup_id = #{param.stockupId} and ldsi.reservation_id = #{param.reservationId}
<if test=" param.allocationId != '' and param.allocationId != null ">

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

@ -97,6 +97,13 @@ public interface IDistributionParcelListService extends BaseService<Distribution
*/
List<PackageStockupVO> selectOrderInfoSelfList(StockupDTO stockupDTO);
/**
* 自提查询订单包件信息
*
* @param stockupDTO@return
*/
List<PackageStockupVO> selectOrderInfoSelfAllocationList(StockupDTO stockupDTO);
List<DistributionParcelListEntity> findALLNoUpShelfPackageByOrderCode(String orderCode,Long warehouseId);
IPage<DistributionParcelListEntity> pageOweList(IPage<Object> page,Map<String, Object> distributionParcelList);

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

@ -74,5 +74,5 @@ public interface IDistrilbutionBillStockService extends BaseService<Distrilbutio
List<DistributionStockupSelfVO> selectDistrilbutionBillPackWuSelf(Long reservationId, Long stockupId);
DistributionStockupSelfVO selectDistrilbutionBillOverPackWuSelf(StockupDTO stockupDTO);
List<DistributionStockupSelfVO> selectDistrilbutionBillOverPackWuSelf(StockupDTO stockupDTO);
}

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

@ -191,6 +191,11 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
return baseMapper.selectOrderInfoSelfList(stockupDTO);
}
@Override
public List<PackageStockupVO> selectOrderInfoSelfAllocationList(StockupDTO stockupDTO) {
return baseMapper.selectOrderInfoSelfAllocationList(stockupDTO);
}
@Override
public List<DistributionParcelListEntity> findALLNoUpShelfPackageByOrderCode(String orderCode,Long warehouseId) {
return baseMapper.findALLNoUpShelfPackageByOrderCode(orderCode,warehouseId);

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

@ -325,7 +325,7 @@ public class DistributionStockServiceImpl extends BaseServiceImpl<DistributionSt
public Integer selectCount(Long id,Long parseLong) {
return baseMapper.selectCount(Wrappers.<DistributionStockEntity>query().lambda()
.eq(DistributionStockEntity::getStockArticle,id)
.eq(ObjectUtils.isNotNull(id),DistributionStockEntity::getStockArticle,id)
.eq(DistributionStockEntity::getStockupId,parseLong)
).intValue();
}

131
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

@ -265,6 +265,13 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
// IPage<DistributionStockupListVO> distributionStockupEntityIPage = baseMapper.selectStockupPage(page, stockupDTO);
List<DistributionStockupListVO> records = distributionStockupEntityIPage.getRecords();
for (DistributionStockupListVO vo : records) {
//查询以扫数量
List<DistributionStockEntity> list = distributionStockService.list(Wrappers.<DistributionStockEntity>query().lambda().eq(DistributionStockEntity::getStockupId, vo.getId()));
if(list.isEmpty()){
vo.setRealNum(0);
}else{
vo.setRealNum(list.size());
}
intToStrDistributionStockupListVO(vo);
if (ObjectUtils.isNull(vo.getInventoryNub())) {
vo.setInventoryNub(0);
@ -956,42 +963,91 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
DistributionStockArticleEntity byId = distributionStockArticleService.getById(stockupDTO.getStockArticleId());
if(stockupDTO.getStatus().equals(1)){
//已备货
DistributionStockupSelfVO distributionStockupSelfVO = distrilbutionBillStockService.selectDistrilbutionBillOverPackWuSelf(stockupDTO);
List<DistributionStockupSelfVO> distributionStockupSelf = distrilbutionBillStockService.selectDistrilbutionBillOverPackWuSelf(stockupDTO);
// DistributionStockupSelfVO distributionStockupSelfVO = distrilbutionBillStockService.selectDistrilbutionBillPackWuSelf(stockupDTO.getReservationId(), stockupDTO.getStockupId());
QueryWrapper<DistributionParcelListEntity> queryWrapper = new QueryWrapper<>();
if(stockupDTO.getStockArticleId().contains(",")){
queryWrapper.in("stock_article_id", stockupDTO.getStockArticleId().split(","));
DistributionStockupSelfVO distributionStockupSelfVO = new DistributionStockupSelfVO();
AtomicReference<Integer> j = new AtomicReference<>(0);
AtomicReference<Integer> y = new AtomicReference<>(0);
if(ObjectUtils.isNotNull(stockupDTO.getAllocationId())){
distributionStockupSelf.forEach(i -> {
if(ObjectUtils.isNotNull(i.getLwugId())){
j.updateAndGet(v -> v + i.getPlanNum());
y.updateAndGet(v -> v + i.getScanNum());
if(ObjectUtils.isNull(distributionStockupSelfVO.getConsignee())){
distributionStockupSelfVO.setConsignee(i.getConsignee());
}else{
if(ObjectUtils.isNotNull(distributionStockupSelfVO.getConsignee()) && !distributionStockupSelfVO.getConsignee().equals(i.getConsignee()) ){
distributionStockupSelfVO.setConsignee(distributionStockupSelfVO.getConsignee()+","+i.getConsignee());
}
}
if(ObjectUtils.isNull(distributionStockupSelfVO.getTrays())){
distributionStockupSelfVO.setTrays(i.getTrays());
}else{
if(ObjectUtils.isNotNull(distributionStockupSelfVO.getTrays()) && !distributionStockupSelfVO.getTrays().equals(i.getTrays())){
distributionStockupSelfVO.setTrays(distributionStockupSelfVO.getTrays()+","+i.getTrays());
}
}
}
});
}else{
queryWrapper.eq("stock_article_id", stockupDTO.getStockArticleId());
distributionStockupSelf.forEach(i -> {
if(ObjectUtils.isNull(i.getLwugId())){
j.updateAndGet(v -> v + 1);
y.updateAndGet(v -> v + i.getScanNum());
if(ObjectUtils.isNull(distributionStockupSelfVO.getConsignee())){
distributionStockupSelfVO.setConsignee(i.getConsignee());
}else{
if(ObjectUtils.isNotNull(distributionStockupSelfVO.getConsignee()) && !distributionStockupSelfVO.getConsignee().equals(i.getConsignee()) ){
distributionStockupSelfVO.setConsignee(distributionStockupSelfVO.getConsignee()+","+i.getConsignee());
}
}
if(ObjectUtils.isNull(distributionStockupSelfVO.getTrays())){
distributionStockupSelfVO.setTrays(i.getTrays());
}else{
if(ObjectUtils.isNotNull(distributionStockupSelfVO.getTrays()) && !distributionStockupSelfVO.getTrays().equals(i.getTrays())){
distributionStockupSelfVO.setTrays(distributionStockupSelfVO.getTrays()+","+i.getTrays());
}
}
}
});
}
if(!stockupDTO.getTypeService().equals("3")){
queryWrapper.eq("order_package_reservation_status", OrderPackageReservationStatusConstant.yiyueyue.getValue());
distributionStockupSelfVO.setPlanNum(j.get());
distributionStockupSelfVO.setScanNum(y.get());
if(stockupDTO.getStockArticleId().contains(",")){
stockupDTO.setStockArticleIdList(stockupDTO.getStockArticleId().split(","));
stockupDTO.setStockArticleId(null);
}
List<DistributionParcelListEntity> list = distributionParcelListService.list(queryWrapper);
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
List<PackageStockupVO> list = distributionParcelListService.selectOrderInfoSelfAllocationList(stockupDTO);
Iterator<PackageStockupVO> iterator = list.iterator();
List<PackageStockupVO> listPack = new ArrayList<>();
list.forEach( i ->{
WarehouseUpdownGoodsLogEntity updownGoodsLogEntity = new WarehouseUpdownGoodsLogEntity();
updownGoodsLogEntity.setAssociationType("3");
updownGoodsLogEntity.setAssociationId(i.getId());
updownGoodsLogEntity.setAllocationId(stockupDTO.getAllocationId());
updownGoodsLogEntity.setBindingType("2");
updownGoodsLogEntity.setWarehouseId(myCurrentWarehouse.getId());
// updownGoodsLogEntity.setAllocationId(i.getId());
WarehouseUpdownGoodsLogEntity updownGoods = warehouseUpdownGoodsLogClient.getUpdownGoods(updownGoodsLogEntity);
if(ObjectUtils.isNotNull(updownGoods)){
PackageStockupVO packageStockupVO = new PackageStockupVO();
packageStockupVO.setOrderCode(i.getOrderCode());
packageStockupVO.setPackageBarCode(i.getOrderPackageCode());
packageStockupVO.setGoodsType(1);
packageStockupVO.setGoodsTypeStr("定制品");
packageStockupVO.setMaterialName(i.getMaterialName());
packageStockupVO.setIsScanStr("已备货");
packageStockupVO.setIsScan(2);
listPack.add(packageStockupVO);
if(ObjectUtils.isNotNull(stockupDTO.getAllocationId()) ){
while (iterator.hasNext()){
PackageStockupVO next = iterator.next();
if(stockupDTO.getAllocationId().equals(next.getAllocationId()) ){
next.setIsScanStr("已备货");
next.setIsScan(2);
listPack.add(next);
}
}
});
}else{
while (iterator.hasNext()){
PackageStockupVO next = iterator.next();
if(ObjectUtils.isNull(next.getAllocationId())){
next.setIsScanStr("已备货");
next.setIsScan(2);
listPack.add(next);
}
}
}
// list.forEach(i -> {
// DistributionStockAllocationVO stockAllocationVO = distributionStockService.selectSelfAllocation(stockupDTO.getReservationId(),stockupDTO.getStockupId(),i.getId());
//
// });
DistributionStockupOrderInfoVO vo = new DistributionStockupOrderInfoVO();
vo.setReservationId(stockupDTO.getReservationId()); //预约id
vo.setCustomer(byId.getMallName()); //客户0
@ -1484,21 +1540,22 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
case 1:
//订单
String orderCode = stockupDTO.getOrderCode();
QueryWrapper<DistributionStockEntity> queryWrapper = new QueryWrapper<>();
if(stockupDTO.getOrderCode().contains(",")){
stockupDTO.setOrderCodeList(stockupDTO.getOrderCode().split(","));
queryWrapper.in("order_self_numbering",stockupDTO.getOrderCodeList());
stockupDTO.setOrderCode(null);
}else{
queryWrapper.eq("order_self_numbering",orderCode);
}
String packetBarCode = stockupDTO.getPacketBarCode();
Integer integer = baseMapper.selectPackageExist(stockupDTO);
if (ObjectUtils.isNotNull(integer) && integer > 0) {
//存在
List<DistributionStockEntity> list = distributionStockService.list(Wrappers.<DistributionStockEntity>query().lambda()
.eq(DistributionStockEntity::getCoding, packetBarCode)
.eq(StringUtils.isNotBlank(stockupDTO.getOrderCode()),DistributionStockEntity::getOrderSelfNumbering, orderCode)
.in(stockupDTO.getOrderCodeList().length > 0,DistributionStockEntity::getOrderSelfNumbering,stockupDTO.getOrderCodeList())
.eq(DistributionStockEntity::getStockupId, stockupId)
.eq(DistributionStockEntity::getReservationId, reservationId)
);
queryWrapper.eq("coding",packetBarCode);
queryWrapper.eq("stockup_id",stockupId);
queryWrapper.eq("reservation_id",reservationId);
List<DistributionStockEntity> list = distributionStockService.list(queryWrapper);
if (!list.isEmpty()) {
//重复扫码
return 2;

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

@ -102,7 +102,7 @@ public class DistrilbutionBillStockServiceImpl extends BaseServiceImpl<Distrilbu
}
@Override
public DistributionStockupSelfVO selectDistrilbutionBillOverPackWuSelf(StockupDTO stockupDTO) {
public List<DistributionStockupSelfVO> selectDistrilbutionBillOverPackWuSelf(StockupDTO stockupDTO) {
return baseMapper.selectDistrilbutionBillOverPackWuSelf(stockupDTO);
}

11
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseUpdownGoodsClient.java

@ -9,8 +9,6 @@ import org.springblade.core.tenant.annotation.NonDS;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import java.sql.Wrapper;
@NonDS
@ApiIgnore
@RestController
@ -61,4 +59,13 @@ public class WarehouseUpdownGoodsClient implements IWarehouseUpdownGoodsClient {
);
return one.getAllocationId();
}
@Override
public WarehouseUpdownGoodsEntity getLocationInformation(WarehouseUpdownGoodsEntity updownGoodsEntity) {
return warehouseUpdownGoodsService.getOne(Wrappers.<WarehouseUpdownGoodsEntity>query().lambda()
.eq(WarehouseUpdownGoodsEntity::getAllocationId,updownGoodsEntity.getAllocationId())
.eq(WarehouseUpdownGoodsEntity::getAssociationValue,updownGoodsEntity.getAssociationValue())
);
}
}

Loading…
Cancel
Save