Browse Source

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

# Conflicts:
#	blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java
training
pref_mail@163.com 1 year ago
parent
commit
1a7b59c569
  1. 1
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupVO.java
  2. 52
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseUpdownTypeClient.java
  3. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java
  4. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryDetailsMapper.xml
  5. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml
  6. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.java
  7. 43
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml
  8. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
  9. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  10. 17
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
  11. 77
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java
  12. 7
      blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/receiver/OpReceivingDataHandler.java
  13. 2
      blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java
  14. 4
      blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java
  15. 99
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseUpdownTypeClient.java

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

@ -34,6 +34,7 @@ public class DistributionStockupVO extends DistributionStockupEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private String headline; private String headline;
private String cargoUnit; //数量
private String groupName; private String groupName;
private String warehouseName; //仓库名称 private String warehouseName; //仓库名称

52
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseUpdownTypeClient.java

@ -0,0 +1,52 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.warehouse.feign;
import com.alibaba.fastjson.JSONObject;
import org.springblade.common.constant.ModuleNameConstant;
import org.springblade.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
/**
* 上下架 Feign接口类
*
* @author zhy
* @since 2023-08-15
*/
@FeignClient(
value = ModuleNameConstant.APPLICATION_WAREHOUSE_NAME
)
public interface IWarehouseUpdownTypeClient {
String API_PREFIX = "warehouseUpdownTypeLog/client";
String TOP = API_PREFIX + "/top";
@GetMapping(TOP + "/downPackage")
R downPackage(@RequestParam("orderPackageCodes") String orderPackageCodes);
@PostMapping(TOP + "/downZeroOrder")
R downZeroOrder(@RequestBody List<JSONObject> zeroOrders);
@PostMapping(TOP + "/downStock")
R downStock(@RequestBody List<JSONObject> stockLists);
}

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

@ -569,8 +569,17 @@ public class DistributionStockupAppController extends BladeController {
//重复扫码 //重复扫码
String audioValue7 = DictBizCache.getValue(DictBizConstant.PDA_AUDIO, "7"); String audioValue7 = DictBizCache.getValue(DictBizConstant.PDA_AUDIO, "7");
return Resp.scanFail("包条码不存在!",audioValue7); return Resp.scanFail("包条码不存在!",audioValue7);
case 8:
//重复扫码
String audioValue8 = DictBizCache.getValue(DictBizConstant.PDA_AUDIO, "8");
return Resp.scanFail("条码已使用!",audioValue8);
case 9:
//重复扫码
String audioValue9 = DictBizCache.getValue(DictBizConstant.PDA_AUDIO, "9");
return Resp.scanFail("没有待绑定的库存品信息!",audioValue9);
} }
} }
log.warn("###################stockupScan: 未知的扫码类型 scanType={}",scanType); log.warn("###################stockupScan: 未知的扫码类型 scanType={}",scanType);
return R.fail("未知的扫码类型"); return R.fail("未知的扫码类型");

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

@ -60,10 +60,10 @@
<select id="oneListNum" resultType="com.logpm.distribution.vo.DistributionDeliveryDetailsVO"> <select id="oneListNum" resultType="com.logpm.distribution.vo.DistributionDeliveryDetailsVO">
select sum(lddd.quantity) wholeNum , ( select sum(lddd.quantity) wholeNum , (
select COUNT(1) select COUNT(DISTINCT ldbls.id)
from logpm_distribution_delivery_details ldd from logpm_distribution_delivery_details ldd
LEFT JOIN logpm_distribution_bill_lading_scan ldbls on ldd.stock_list_id = ldbls.stock_list_id LEFT JOIN logpm_distribution_bill_lading_scan ldbls on ldd.stock_list_id = ldbls.stock_list_id
where lddd.bill_lading_id = #{id} and ldd.is_deleted = 0 where ldbls.bill_lading_id = #{id} and ldd.is_deleted = 0
) esauNum ) esauNum
from logpm_distribution_delivery_details lddd from logpm_distribution_delivery_details lddd
where lddd.bill_lading_id = #{id} and lddd.is_deleted = 0 where lddd.bill_lading_id = #{id} and lddd.is_deleted = 0

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

@ -234,7 +234,8 @@
<select id="selectStockListInfoList" resultType="com.logpm.distribution.vo.StockListInfoListVO"> <select id="selectStockListInfoList" resultType="com.logpm.distribution.vo.StockListInfoListVO">
select select
s.coding packageCode, s.coding packageCode,
s.goods_name name s.goods_name name,
ldsl.
from logpm_distribution_reservation ldr from logpm_distribution_reservation ldr
left join logpm_distribution_reservation_stocklist ldrs on ldrs.reservation_id = ldr.id and ldrs.is_deleted = 0 and ldrs.stock_list_status in (1,3) left join logpm_distribution_reservation_stocklist ldrs on ldrs.reservation_id = ldr.id and ldrs.is_deleted = 0 and ldrs.stock_list_status in (1,3)

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

@ -168,4 +168,6 @@ public interface DistributionStockupMapper extends BaseMapper<DistributionStocku
* @return * @return
*/ */
IPage<DistributionStockupEntity> pageOweList(IPage<Object> page,@Param("param")DistributionStockupEntity distributionStockupEntity); IPage<DistributionStockupEntity> pageOweList(IPage<Object> page,@Param("param")DistributionStockupEntity distributionStockupEntity);
IPage<DistributionStockupVO> getInventoryOwnSelf(IPage<Object> page,@Param("id") Long id);
} }

43
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml

@ -83,6 +83,32 @@
</where> </where>
GROUP BY lds.id GROUP BY lds.id
</select> </select>
<select id="getInventoryOwnSelf" resultType="com.logpm.distribution.vo.DistributionStockupVO">
select DISTINCT ldsii.sku,ldsii.cargo_unit cargoUnit,lds.stockup_status stockupStatus,lds.stockup_date stockupDate,lds.stockup_area stockupArea,ldsii.description_goods descriptionGoods
,lddd.quantity reservationNum,ldsii.order_code orderCode,
(
select GROUP_CONCAT(DISTINCT tray_code)
from logpm_warehouse_tray_goods
where association_id = ldsii.id and market_id = ldsii.market_id
) pallet ,
(
select GROUP_CONCAT(DISTINCT position_code)
from logpm_warehouse_updown_goods
where association_id = ldsii.id and market_id = ldsii.market_id
) goodsAllocation,
(
select count(1)
from logpm_distribution_stock ds
WHERE ds.stock_list_id = ldsii.id and ds.bill_lading_id = lddd.bill_lading_id
) number
from logpm_distribution_stockup lds
LEFT JOIN logpm_distribution_stockup_info ldsi on lds.id = ldsi.stockup_id
LEFT JOIN logpm_distribution_delivery_details lddd on lddd.bill_lading_id = ldsi.reservation_id
LEFT JOIN logpm_distribution_stock_list ldsii on ldsii.id = lddd.stock_list_id
<where>
ldsi.stockup_id =#{id}
</where>
</select>
<select id="pageOweList" resultType="com.logpm.distribution.vo.DistributionStockupVO"> <select id="pageOweList" resultType="com.logpm.distribution.vo.DistributionStockupVO">
select DISTINCT lds.id,lds.stockup_date stockupDate, lds.stockup_user stockupUser, lds.stockup_status stockupStatus, lds.stockup_area stockupArea, select DISTINCT lds.id,lds.stockup_date stockupDate, lds.stockup_user stockupUser, lds.stockup_status stockupStatus, lds.stockup_area stockupArea,
lds.assign_status assignStatus, lds.goods_area_id goodsAreaId, lds.forklift_name forkliftName, lds.assign_status assignStatus, lds.goods_area_id goodsAreaId, lds.forklift_name forkliftName,
@ -152,7 +178,7 @@
where ds.id = lds.id where ds.id = lds.id
) orderNum , ) orderNum ,
( (
select COUNT(ldrp.id) select COUNT(DISTINCT ldrp.id)
from logpm_distribution_stockup ds from logpm_distribution_stockup ds
LEFT JOIN logpm_distribution_stockup_info ldsi on ds.id = ldsi.stockup_id LEFT JOIN logpm_distribution_stockup_info ldsi on ds.id = ldsi.stockup_id
LEFT JOIN logpm_distribution_reservation_package ldrp on ldrp.reservation_id = ldsi.reservation_id and ldrp.packet_bar_status in (1,3) LEFT JOIN logpm_distribution_reservation_package ldrp on ldrp.reservation_id = ldsi.reservation_id and ldrp.packet_bar_status in (1,3)
@ -215,11 +241,11 @@
LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.stock_article_id = ldbs.stock_article_id LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.stock_article_id = ldbs.stock_article_id
where ldbs.bill_lading_id = ldsi.reservation_id) where ldbs.bill_lading_id = ldsi.reservation_id)
) trays , ) trays ,
(select COUNT(id) (select COUNT(DISTINCT id)
from logpm_distrilbution_bill_stock from logpm_distrilbution_bill_stock
where bill_lading_id = ldsi.reservation_id and order_status in (1,2) ) orderNum, where bill_lading_id = ldsi.reservation_id and order_status in (1,2) ) orderNum,
( (
select COUNT(ldbs.id) select COUNT(DISTINCT ldbs.id)
from logpm_distrilbution_bill_stock ldbs from logpm_distrilbution_bill_stock ldbs
LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.stock_article_id = ldbs.stock_article_id LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.stock_article_id = ldbs.stock_article_id
where ldbs.bill_lading_id = ldsi.reservation_id where ldbs.bill_lading_id = ldsi.reservation_id
@ -230,7 +256,7 @@
where lddd.bill_lading_id = ldbs.bill_lading_id where lddd.bill_lading_id = ldbs.bill_lading_id
) inventoryNub, ) inventoryNub,
( (
select COUNT(id) select COUNT(DISTINCT id)
from logpm_distribution_stock from logpm_distribution_stock
where parcel_list_id in ( where parcel_list_id in (
select id select id
@ -238,7 +264,7 @@
where ldbs.stock_article_id = stock_article_id where ldbs.stock_article_id = stock_article_id
) )
)+( )+(
select COUNT(lds.id) select COUNT(DISTINCT lds.id)
from logpm_distribution_delivery_details lddd from logpm_distribution_delivery_details lddd
LEFT JOIN logpm_distribution_stock lds on lddd.stock_list_id = lds.stock_list_id LEFT JOIN logpm_distribution_stock lds on lddd.stock_list_id = lds.stock_list_id
where lds.bill_lading_id =ldbs.bill_lading_id where lds.bill_lading_id =ldbs.bill_lading_id
@ -554,9 +580,7 @@
where dpl.stock_article_id = ldrsi.stocklist_id where dpl.stock_article_id = ldrsi.stocklist_id
) )
) number ) number
from logpm_distribution_stockup_info ldsi from logpm_distribution_stockup_info ldsi
LEFT JOIN logpm_distribution_reservation_stockarticle ldrs on ldsi.reservation_id = ldrs.reservation_id LEFT JOIN logpm_distribution_reservation_stockarticle ldrs on ldsi.reservation_id = ldrs.reservation_id
LEFT JOIN logpm_distribution_reservation_stocklist ldrsi on ldrsi.reservation_id = ldrs.reservation_id LEFT JOIN logpm_distribution_reservation_stocklist ldrsi on ldrsi.reservation_id = ldrs.reservation_id
LEFT JOIN logpm_distribution_stockup lds on lds.id = ldsi.stockup_id LEFT JOIN logpm_distribution_stockup lds on lds.id = ldsi.stockup_id
@ -589,8 +613,9 @@
and ldsi.is_deleted = 0 and ldsi.is_deleted = 0
</select> </select>
<select id="getInventoryCheSelf" resultType="com.logpm.distribution.vo.DistributionStockupVO"> <select id="getInventoryCheSelf" resultType="com.logpm.distribution.vo.DistributionStockupVO">
select lddd.quantity,ldsi.reservation_id select lddd.quantity reservationStockListNum,ldsi.reservation_id,lds.type_service
from logpm_distribution_stockup_info ldsi from logpm_distribution_stockup lds
LEFT JOIN logpm_distribution_stockup_info ldsi on ldsi.stockup_id = lds.id
LEFT JOIN logpm_distribution_delivery_details lddd on ldsi.reservation_id = lddd.bill_lading_id LEFT JOIN logpm_distribution_delivery_details lddd on ldsi.reservation_id = lddd.bill_lading_id
<where> <where>
ldsi.stockup_id =#{id} and lddd.inventory_status in (1,2) ldsi.stockup_id =#{id} and lddd.inventory_status in (1,2)

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java

@ -32,6 +32,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation; import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
@ -621,6 +622,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
reservationEntity.setStockupStatus(StockupStatusConstant.beihuozhong.getValue()); reservationEntity.setStockupStatus(StockupStatusConstant.beihuozhong.getValue());
}else if (i== 0){ }else if (i== 0){
distributionStockup.setId(stockupDTO.getStockupId()); distributionStockup.setId(stockupDTO.getStockupId());
distributionStockup.setFixTime(new Date());
distributionStockup.setStockupStatus(StockupStatusConstant.yibeihuo.getValue()); distributionStockup.setStockupStatus(StockupStatusConstant.yibeihuo.getValue());
reservationEntity.setId(stockupDTO.getReservationId()); reservationEntity.setId(stockupDTO.getReservationId());
reservationEntity.setStockupStatus(StockupStatusConstant.yibeihuo.getValue()); reservationEntity.setStockupStatus(StockupStatusConstant.yibeihuo.getValue());
@ -685,6 +687,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
//改为已完成 //改为已完成
//修改备货状态 //修改备货状态
distributionStockup.setId(stockupDTO.getStockupId()); distributionStockup.setId(stockupDTO.getStockupId());
distributionStockup.setFixTime(new Date());
distributionStockup.setStockupStatus(StockupStatusConstant.yibeihuo.getValue()); distributionStockup.setStockupStatus(StockupStatusConstant.yibeihuo.getValue());
} }
}else{ }else{

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

@ -1242,7 +1242,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
// if (distrilbutionloadingscanDTO.getStockType() == 1) { // if (distrilbutionloadingscanDTO.getStockType() == 1) {
//查询该包条是否属于该配送任务 //查询该包条是否属于该配送任务
List<DistributionLoadscanEntity> distributionLoadscanEntities = baseMapper.selectdeliverywork(distrilbutionloadingscanDTO.getBarcode(), distrilbutionloadingscanDTO.getDeliveryId()); List<DistributionLoadscanEntity> distributionLoadscanEntities = baseMapper.selectdeliverywork(distrilbutionloadingscanDTO.getBarcode(), distrilbutionloadingscanDTO.getDeliveryId());
if (distributionLoadscanEntities.isEmpty()) { if ( null == distributionLoadscanEntities || distributionLoadscanEntities.isEmpty() ) {
return R.fail(3001, "窜货"); return R.fail(3001, "窜货");
} }
// 串货后 下面的代码执行的意义不存在 // 串货后 下面的代码执行的意义不存在
@ -1256,7 +1256,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//TODO 托盘扫描 //TODO 托盘扫描
//查询该包条是否属于该配送任务 //查询该包条是否属于该配送任务
List<DistributionLoadscanEntity> distributionLoadscanEntities = baseMapper.selectdeliverypallet(distrilbutionloadingscanDTO.getBarcode(), distrilbutionloadingscanDTO.getDeliveryId()); List<DistributionLoadscanEntity> distributionLoadscanEntities = baseMapper.selectdeliverypallet(distrilbutionloadingscanDTO.getBarcode(), distrilbutionloadingscanDTO.getDeliveryId());
if (distributionLoadscanEntities.isEmpty()) { if (null == distributionLoadscanEntities || distributionLoadscanEntities.isEmpty()) {
return R.fail(3001, "窜货"); return R.fail(3001, "窜货");
} }
for (DistributionLoadscanEntity distributionLoadscanEntity : distributionLoadscanEntities) { for (DistributionLoadscanEntity distributionLoadscanEntity : distributionLoadscanEntities) {
@ -1273,7 +1273,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (distributionReservationStockarticleEntity.getIsHaveData() == 1) { if (distributionReservationStockarticleEntity.getIsHaveData() == 1) {
//查询订单是否属于该配送任务 //查询订单是否属于该配送任务
List<DistributionLoadscanEntity> distributionLoadscanEntities = baseMapper.selectOrderpallet(distrilbutionloadingscanDTO.getBarcode(), distrilbutionloadingscanDTO.getDeliveryId()); List<DistributionLoadscanEntity> distributionLoadscanEntities = baseMapper.selectOrderpallet(distrilbutionloadingscanDTO.getBarcode(), distrilbutionloadingscanDTO.getDeliveryId());
if (distributionLoadscanEntities.isEmpty()) { if (null == distributionLoadscanEntities || distributionLoadscanEntities.isEmpty()) {
return R.fail(3001, "窜货"); return R.fail(3001, "窜货");
} }
for (DistributionLoadscanEntity distributionLoadscanEntity : distributionLoadscanEntities) { for (DistributionLoadscanEntity distributionLoadscanEntity : distributionLoadscanEntities) {
@ -1544,7 +1544,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
.eq(DistributionLoadscanEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId()) .eq(DistributionLoadscanEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId())
.eq(DistributionLoadscanEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode()) .eq(DistributionLoadscanEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode())
); );
if (distributionLoadscanEntities.isEmpty()) { if (null == distributionLoadscanEntities || distributionLoadscanEntities.isEmpty()) {
return R.fail(3005, "该货物未装车"); return R.fail(3005, "该货物未装车");
} }
boolean b = false; boolean b = false;

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

@ -182,7 +182,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
disStockListDetail.setWarehouseId(i.getWarehouseId()); disStockListDetail.setWarehouseId(i.getWarehouseId());
disStockListDetail.setWarehouseName(i.getWarehouseName()); disStockListDetail.setWarehouseName(i.getWarehouseName());
disStockListDetail.setReservationId(i.getBillLadingId()); disStockListDetail.setReservationId(i.getBillLadingId());
disStockListDetail.setStockPackageCode("1"); disStockListDetail.setStockPackageStatus("1");
disStockListDetail.setStockListId(i.getStockListId()); disStockListDetail.setStockListId(i.getStockListId());
disStockListDetail.setStockLockingStatus(StockLockingStatusConstant.wuzhuangche.getValue()); disStockListDetail.setStockLockingStatus(StockLockingStatusConstant.wuzhuangche.getValue());
disStockListDetail.setStockStatus(StockStatusConstant.daibangding.getValue()); disStockListDetail.setStockStatus(StockStatusConstant.daibangding.getValue());
@ -630,13 +630,13 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
@Override @Override
public IPage<DistributionStockupVO> getInventoryOwnSelf(IPage<Object> page, long id) { public IPage<DistributionStockupVO> getInventoryOwnSelf(IPage<Object> page, long id) {
IPage<DistributionStockupVO> l = new Page<>(); IPage<DistributionStockupVO> l = new Page<DistributionStockupVO>();
List<DistributionStockupVO> inventoryChe = baseMapper.getInventoryCheSelf(id); List<DistributionStockupVO> inventoryChe = baseMapper.getInventoryCheSelf(id);
if (inventoryChe.size() > 0) { if (!inventoryChe.isEmpty()) {
boolean b = inventoryChe.stream().anyMatch(i -> ObjectUtils.isNotNull(i.getReservationStockListNum()) && i.getReservationStockListNum() > 0); boolean b = inventoryChe.stream().anyMatch(i -> ObjectUtils.isNotNull(i.getReservationStockListNum()) && i.getReservationStockListNum() > 0);
if (b) { if (b) {
//查询库存品 //查询库存品
return baseMapper.getInventoryOwn(page, id); return baseMapper.getInventoryOwnSelf(page, id);
} else { } else {
return l; return l;
} }
@ -1074,7 +1074,12 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
DisStockListDetailEntity disStockListDetail = new DisStockListDetailEntity(); DisStockListDetailEntity disStockListDetail = new DisStockListDetailEntity();
DisStockOrdercodeRecoEntity ordercodeRecoEntity = new DisStockOrdercodeRecoEntity(); DisStockOrdercodeRecoEntity ordercodeRecoEntity = new DisStockOrdercodeRecoEntity();
DisStockOrdercodeRecoEntity one = disStockOrdercodeRecoService.getOne(Wrappers.<DisStockOrdercodeRecoEntity>query().lambda()
.eq(DisStockOrdercodeRecoEntity::getCode, stockupDTO.getPacketBarCode())
);
if(ObjectUtils.isNotNull(one) && one.getCodeStatus().equals("1")){
return 8;
}
//查询仓库信息 //查询仓库信息
DistributionStockListEntity byId = distributionStockListService.getById(stockupDTO.getStockListId()); DistributionStockListEntity byId = distributionStockListService.getById(stockupDTO.getStockListId());
//有 绑定 查询有没有库存品信息 //有 绑定 查询有没有库存品信息
@ -1117,7 +1122,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
} else { } else {
//没有包件信息 //没有包件信息
return 7; return 9;
} }

77
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

@ -65,6 +65,7 @@ import java.math.BigDecimal;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@ -534,10 +535,10 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
} else { } else {
vo.setInventoryNum(0); vo.setInventoryNum(0);
} }
vo.setOrderNum(orderNum); vo.setOrderNum(orderNum); //订单总数
vo.setPlanNum(planNum); vo.setPlanNum(planNum); //自提件数
vo.setSignedNum(signedNum); vo.setSignedNum(signedNum); //签收总数
vo.setInventoryNub(inventoryNub); vo.setInventoryNub(inventoryNub); //库存品数
} }
pageList.setRecords(records); pageList.setRecords(records);
@ -1043,12 +1044,76 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
//查询订单数 //查询订单数
List<DistrilbutionBillStockEntity> list = distrilbutionBillStockService.list(Wrappers.<DistrilbutionBillStockEntity>query().lambda() List<DistrilbutionBillStockEntity> list = distrilbutionBillStockService.list(Wrappers.<DistrilbutionBillStockEntity>query().lambda()
.eq(DistrilbutionBillStockEntity::getBillLadingId, billLadingId) .eq(DistrilbutionBillStockEntity::getBillLadingId, billLadingId)
.apply("order_status in (1,2)")
); );
AtomicReference<Integer> pake = new AtomicReference<>(0); // 包件数量
AtomicReference<Integer> pakeys = new AtomicReference<>(0); // 包件以扫数量
boolean apj = false;
if(list.size() > 0){
//查询包件数量
list.forEach(i ->{
List<DistributionParcelListEntity> list1 = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda()
.eq(DistributionParcelListEntity::getStockArticleId, i.getStockArticleId())
);
int size = list1.size();
pake.set(pake.get() + size);
//查询扫码数量
List<DistributionBillLadingScanEntity> list2 = distributionBillLadingScanService.list(Wrappers.<DistributionBillLadingScanEntity>query().lambda()
.eq(DistributionBillLadingScanEntity::getBillLadingId, billLadingId)
.eq(DistributionBillLadingScanEntity::getStockArticleId, i.getStockArticleId())
);
int size2 = list2.size();
pakeys.set(pakeys.get() + size2);
});
if(pake.get().equals(pakeys.get()+1)){
//订单完成备货
apj = true;
}
}else{
//订单完成备货
apj = true;
}
//查询库存品数 //查询库存品数
List<DistributionDeliveryDetailsEntity> list1 = distributionDeliveryDetailsService.list(Wrappers.<DistributionDeliveryDetailsEntity>query().lambda() List<DistributionDeliveryDetailsEntity> list1 = distributionDeliveryDetailsService.list(Wrappers.<DistributionDeliveryDetailsEntity>query().lambda()
.eq(DistributionDeliveryDetailsEntity::getBillLadingId, billLadingId) .eq(DistributionDeliveryDetailsEntity::getBillLadingId, billLadingId)
); );
long count = list.stream().filter(e -> e.getConditions().equals("2")).count(); // 订 已签收的数 //
AtomicReference<Integer> kcq = new AtomicReference<>(0); // 库存全部数量
AtomicReference<Integer> kcs = new AtomicReference<>(0); // 库存以扫数量
boolean kc = false;
if(list1.size() > 0){
list1.forEach( i -> {
//查询以扫数量
List<DistributionBillLadingScanEntity> list2 = distributionBillLadingScanService.list(Wrappers.<DistributionBillLadingScanEntity>query().lambda()
.eq(DistributionBillLadingScanEntity::getBillLadingId, billLadingId)
.eq(DistributionBillLadingScanEntity::getStockListId, i.getStockListId())
);
kcq.set(kcq.get()+i.getQuantity());//全部数量
int size = list2.size();
kcs.set(kcs.get()+size);//以扫数量
});
//多个
if(kcq.get() == (kcs.get()+1)){
kc=true;
}
}else{
kc = true;
}
if(apj && kc){
//完成
//已完成
//修改提货任务状态
DistrilbutionBillLadingEntity billLadingEntity = new DistrilbutionBillLadingEntity();
String bill = (String) billLadingId;
billLadingEntity.setId(Long.valueOf(bill));
billLadingEntity.setConditions("20");
baseMapper.updateById(billLadingEntity);
}
/*long count = list.stream().filter(e -> e.getConditions().equals("2")).count(); // 订 已签收的数
long count2 = list1.stream().filter(e -> e.getConditions().equals("2")).count(); // 库 已签收的数 long count2 = list1.stream().filter(e -> e.getConditions().equals("2")).count(); // 库 已签收的数
if (Integer.parseInt(String.valueOf(count)) == list.size() && Integer.parseInt(String.valueOf(count2)) == list1.size()) { if (Integer.parseInt(String.valueOf(count)) == list.size() && Integer.parseInt(String.valueOf(count2)) == list1.size()) {
//修改提货任务状态 //修改提货任务状态
@ -1057,7 +1122,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
billLadingEntity.setId(Long.valueOf(bill)); billLadingEntity.setId(Long.valueOf(bill));
billLadingEntity.setConditions("20"); billLadingEntity.setConditions("20");
baseMapper.updateById(billLadingEntity); baseMapper.updateById(billLadingEntity);
} }*/
return Resp.scanFail( "签收成功","签收成功"); return Resp.scanFail( "签收成功","签收成功");
} }
} }

7
blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/receiver/OpReceivingDataHandler.java

@ -7,7 +7,6 @@ import com.logpm.factory.pan.service.IPanFactoryDataService;
import com.rabbitmq.client.Channel; import com.rabbitmq.client.Channel;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.RabbitConstant; import org.springblade.common.constant.RabbitConstant;
import org.springblade.common.utils.CommonUtil;
import org.springframework.amqp.core.Message; import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitHandler; import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener; import org.springframework.amqp.rabbit.annotation.RabbitListener;
@ -15,8 +14,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.io.IOException; import java.io.IOException;
import java.time.LocalTime;
import java.util.Date;
import java.util.Map; import java.util.Map;
@ -26,7 +23,7 @@ import java.util.Map;
* @author yangkai.shen * @author yangkai.shen
*/ */
@Slf4j @Slf4j
@RabbitListener(queues = RabbitConstant.RECEIVE_INFO_QUEUE) @RabbitListener(queues = RabbitConstant.OUPAI_RECEIVING_QUEUE)
@Component @Component
public class OpReceivingDataHandler { public class OpReceivingDataHandler {
@ -58,7 +55,7 @@ public class OpReceivingDataHandler {
log.info("##################opReceivingDataHandler: 处理欧派收货数据到新系统,packageStatus:{},orderPackageCode:{},receivingTime{}", log.info("##################opReceivingDataHandler: 处理欧派收货数据到新系统,packageStatus:{},orderPackageCode:{},receivingTime{}",
packageStatus,orderPackageCode,receivingTime); packageStatus,orderPackageCode,receivingTime);
//判断是否是已入库 //判断是否是已入库
if("已库".equals(packageStatus)){ if("已库".equals(packageStatus)){
//真正的处理需要的数据 //真正的处理需要的数据
try { try {
panFactoryDataService.handleDataToPlatform(orderPackageCode, receivingTime); panFactoryDataService.handleDataToPlatform(orderPackageCode, receivingTime);

2
blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java

@ -178,7 +178,7 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService {
map.put("createTime", new Date().getTime()); map.put("createTime", new Date().getTime());
try { try {
rabbitTemplate.convertAndSend(RabbitConstant.RECEIVE_INFO_EXCHANGE, RabbitConstant.RECEIVE_INFO_ROUTING, map); rabbitTemplate.convertAndSend(RabbitConstant.OUPAI_RECEIVING_EXCHANGE, RabbitConstant.OUPAI_RECEIVING_ROUTING, map);
} catch (Exception e) { } catch (Exception e) {
log.error("############handlePackageData: {}", e.getMessage()); log.error("############handlePackageData: {}", e.getMessage());
} }

4
blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java

@ -549,8 +549,8 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
/** /**
* 根据客户ID 查询客户的配送类型 * 根据客户ID 查询客户的配送类型
* *
* @param id 客户ID * @param id
* @return String 客户的服务类型 * @return
*/ */
private String getPeisongTypeByClientId(Long id) { private String getPeisongTypeByClientId(Long id) {
BasicdataStoreBusinessEntity basicdataStoreBusinessEntity = basicdataStoreBusinessClient.findByClientIdAndTypeService(id, 3); BasicdataStoreBusinessEntity basicdataStoreBusinessEntity = basicdataStoreBusinessClient.findByClientIdAndTypeService(id, 3);

99
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseUpdownTypeClient.java

@ -0,0 +1,99 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.warehouse.feign;
import com.alibaba.fastjson.JSONObject;
import com.logpm.warehouse.dto.UpShelfPackageDTO;
import com.logpm.warehouse.dto.UpShelfStockDTO;
import com.logpm.warehouse.dto.UpShelfZeroOrderDTO;
import com.logpm.warehouse.service.IWarehouseUpdownTypeService;
import lombok.AllArgsConstructor;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import java.util.ArrayList;
import java.util.List;
/**
* 上下架记录表 Feign实现类
*
* @author lmy
* @since 2023-08-15
*/
@ApiIgnore()
@RestController
@AllArgsConstructor
public class WarehouseUpdownTypeClient implements IWarehouseUpdownTypeClient {
private final IWarehouseUpdownTypeService warehouseUpdownTypeService;
@Override
public R downPackage(String orderPackageCodes) {
List<UpShelfPackageDTO> upShelfPackageList = new ArrayList<>();
String[] split = orderPackageCodes.split(",");
for(String orderPackageCode:split){
UpShelfPackageDTO dto = new UpShelfPackageDTO();
dto.setOrderPackageCode(orderPackageCode);
upShelfPackageList.add(dto);
}
if(upShelfPackageList.size() > 0){
return warehouseUpdownTypeService.downPackage(upShelfPackageList);
}else{
return R.fail(403,"处理失败");
}
}
@Override
public R downZeroOrder(List<JSONObject> zeroOrders) {
List<UpShelfZeroOrderDTO> ls = new ArrayList<>();
for (JSONObject jsonObject:zeroOrders){
UpShelfZeroOrderDTO dto = new UpShelfZeroOrderDTO();
dto.setOrderCode(jsonObject.getString("orderCode"));//订单号
dto.setWaybillCode(jsonObject.getString("waybillCode"));//运单号
dto.setEnterNum(jsonObject.getInteger("enterNum"));//件数
dto.setAllocationId(jsonObject.getLong("allocationId"));//库位id
ls.add(dto);
}
if(ls.size() > 0){
return warehouseUpdownTypeService.downZeroOrder(ls);
}else{
return R.fail(403,"处理失败");
}
}
@Override
public R downStock(List<JSONObject> stockLists) {
List<UpShelfStockDTO> ls = new ArrayList<>();
for (JSONObject jsonObject:stockLists){
UpShelfStockDTO dto = new UpShelfStockDTO();
dto.setMarketId(jsonObject.getLong("marketId"));//商场id
dto.setMaterialCode(jsonObject.getString("materialCode"));//物料编码
dto.setIncomingBatch(jsonObject.getString("incomingBatch"));//批次号
dto.setEnterNum(jsonObject.getInteger("enterNum"));//件数
dto.setAllocationId(jsonObject.getLong("allocationId"));//库位id
ls.add(dto);
}
if(ls.size() > 0){
return warehouseUpdownTypeService.downStock(ls);
}else{
return R.fail(403,"处理失败");
}
}
}
Loading…
Cancel
Save