Browse Source

add:

1.增加自提复核节点数据修改
dist.1.3.0
pref_mail@163.com 7 months ago
parent
commit
94577179bd
  1. 1
      blade-biz-common/src/main/java/org/springblade/common/constant/WorkNodeEnums.java
  2. 15
      blade-biz-common/src/main/java/org/springblade/common/constant/broadcast/FanoutConstants.java
  3. 16
      blade-biz-common/src/main/java/org/springblade/common/model/workNode/PickUpByReCheckVO.java
  4. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionNodeWorkService.java
  5. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java
  6. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionNodeWorkServiceImpl.java
  7. 39
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockServiceImpl.java
  8. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
  9. 80
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

1
blade-biz-common/src/main/java/org/springblade/common/constant/WorkNodeEnums.java

@ -65,6 +65,7 @@ public enum WorkNodeEnums implements Serializable {
EDIT_BILLOFLADING(301045, "自提计划编辑"),
CANCEL_BILLOFLADING(301050, "取消自提"),
SIGN_BILLOFLADING(301080, "自提签收"),
SIGN_BILLOFLADING_REVIEW(301090, "自提复核"),
PLAN_DISTRIBUTION(301060, "计划配车"),
CANCEL_DISTRIBUTION(301070, "取消配车"),

15
blade-biz-common/src/main/java/org/springblade/common/constant/broadcast/FanoutConstants.java

@ -311,7 +311,6 @@ public abstract class FanoutConstants {
/**
* @see org.springblade.common.model.workNode.PickUpByScanVO
*/
interface BillSign {
String EXCHANGE = "fanout.DeliveryOfPickup.billscan" + ModuleNameConstant.DEVAUTH;
@ -321,6 +320,20 @@ public abstract class FanoutConstants {
}
}
/**
* 自提签收复核
* @see org.springblade.common.model.workNode.PickUpByReCheckVO
*/
interface BillSignReview {
String EXCHANGE = "fanout.DeliveryOfPickup.billsignreview" + ModuleNameConstant.DEVAUTH;
interface QUEUE {
String REPORT = "fanout.DeliveryOfPickup.billsignreview.report" + ModuleNameConstant.DEVAUTH;
}
}
}
}

16
blade-biz-common/src/main/java/org/springblade/common/model/workNode/PickUpByReCheckVO.java

@ -0,0 +1,16 @@
package org.springblade.common.model.workNode;
import lombok.Data;
/**
* 自提单复核
*/
@Data
public class PickUpByReCheckVO extends PickUpByScanVO{
/**
* 签收图片
*/
private String images;
}

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

@ -5,6 +5,7 @@ import com.logpm.distribution.entity.DistributionParcelListEntity;
import org.springblade.common.enums.BizOperationEnums;
import org.springblade.common.model.*;
import org.springblade.common.model.workNode.DeliveryOfPickupPlanVO;
import org.springblade.common.model.workNode.PickUpByReCheckVO;
import org.springblade.common.model.workNode.PickUpByScanVO;
import org.springblade.core.secure.BladeUser;
@ -110,7 +111,7 @@ public interface IDistributionNodeWorkService {
/**
* 自提签收复核
*/
void billofladingSignforCheck();
void billofladingSignforCheck(NodeFanoutMsg<PickUpByReCheckVO> nodeFanoutMsg, BladeUser user);
/**
* 滞留

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java

@ -20,6 +20,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.app.StockConfigInfoVO;
import com.logpm.distribution.dto.app.StockupDTO;
import com.logpm.distribution.dto.app.StockupZeroDTO;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionReservationEntity;
import com.logpm.distribution.entity.DistributionStockListEntity;
import com.logpm.distribution.entity.DistributionStockupEntity;
import com.logpm.distribution.excel.DistributionCityExcel;
@ -27,6 +29,8 @@ import com.logpm.distribution.excel.DistributionMarketExcel;
import com.logpm.distribution.excel.DistributionSelfExcel;
import com.logpm.distribution.excel.DistributionStockupPackageListDetailExcel;
import com.logpm.distribution.vo.*;
import org.springblade.common.model.NodeFanoutMsg;
import org.springblade.common.model.StockUpVO;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R;
import org.springblade.system.entity.User;
@ -315,4 +319,6 @@ public interface IDistributionStockupService extends BaseService<DistributionSto
* @return
*/
R stockupScanByStock(StockupDTO stockupDTO);
NodeFanoutMsg<StockUpVO> buildStockUpNodeData(DistributionStockupEntity distributionStockupEntity, DistributionReservationEntity reservationEntity, List<DistributionParcelListEntity> parcelListEntitys);
}

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

@ -13,6 +13,7 @@ import org.springblade.common.constant.WorkNodeEnums;
import org.springblade.common.constant.broadcast.FanoutConstants;
import org.springblade.common.model.*;
import org.springblade.common.model.workNode.DeliveryOfPickupPlanVO;
import org.springblade.common.model.workNode.PickUpByReCheckVO;
import org.springblade.common.model.workNode.PickUpByScanVO;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.AuthUtil;
@ -190,8 +191,12 @@ public class DistributionNodeWorkServiceImpl implements IDistributionNodeWorkSer
}
@Override
public void billofladingSignforCheck() {
public void billofladingSignforCheck(NodeFanoutMsg<PickUpByReCheckVO> nodeFanoutMsg, BladeUser user) {
try {
rabbitTemplate.convertAndSend(FanoutConstants.DeliveryOfPickup.BillSign.EXCHANGE, null, com.alibaba.fastjson.JSONObject.toJSONString(nodeFanoutMsg));
} catch (AmqpException e) {
log.error(">>>>>>>>>>>>>>>>>>>>>>>>>> 自提复核消息推送失败~ 请联系管理员! ", e);
}
}
@Override

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

@ -37,7 +37,11 @@ import org.apache.logging.log4j.util.Strings;
import org.springblade.common.constant.order.OrderStockupStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageStockupStatusConstant;
import org.springblade.common.constant.stockup.StockupStatusConstant;
import org.springblade.common.model.NodeFanoutMsg;
import org.springblade.common.model.StockUpVO;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.secure.utils.AuthUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
@ -53,31 +57,42 @@ import java.util.*;
*/
@Log4j2
@Service
@AllArgsConstructor
public class DistributionStockServiceImpl extends BaseServiceImpl<DistributionStockMapper, DistributionStockEntity> implements IDistributionStockService {
@Autowired
private IDistributionParcelListService distributionParcelListService;
@Autowired
private IDistributionReservationService distributionReservationService;
@Autowired
private IDistributionReservationPackageService distributionReservationPackageService;
@Autowired
private IDistrilbutionBillPackageService distrilbutionBillPackageService;
@Autowired
private DistributionStockupMapper distributionStockupMapper;
@Lazy
@Autowired
private DistrilbutionBillLadingMapper distrilbutionBillLadingMapper;
private IDistributionDeliveryListService distributionDeliveryListService;
@Autowired
private IDistributionStockupInfoService distributionStockupInfoService;
@Autowired
private IDistributionStockupService distributionStockupService;
@Autowired
private IDistributionStockListService distributionStockListService;
@Autowired
private IDistributionStockArticleService distributionStockArticleService;
@Autowired
private IDistributionDeliveryDetailsService distributionDeliveryDetailsService;
@Autowired
private IDistributionNodeWorkService distributionNodeWorkService;
@Override
public IPage<DistributionStockVO> selectDistributionStockPage(IPage<DistributionStockVO> page, DistributionStockVO distributionStock) {
@ -288,6 +303,18 @@ public class DistributionStockServiceImpl extends BaseServiceImpl<DistributionSt
}
}
distributionReservationService.updateById(reservationEntity);
// 备货作业节点
DistributionStockupEntity distributionStockupEntity = distributionStockupMapper.selectById(distributionStocks.getStockupId());
List<DistributionParcelListEntity> datas = new ArrayList<>();
datas.add(byId);
NodeFanoutMsg<StockUpVO> nodeFanoutMsg = distributionStockupService.buildStockUpNodeData(distributionStockupEntity,reservationEntity, datas);
if (ObjectUtils.isNotNull(nodeFanoutMsg)) {
distributionNodeWorkService.planStock(nodeFanoutMsg, AuthUtil.getUser());
}
}
}
}

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

@ -47,7 +47,6 @@ import com.logpm.distribution.excel.DistributionStockupPackageListDetailExcel;
import com.logpm.distribution.mapper.*;
import com.logpm.distribution.service.*;
import com.logpm.distribution.vo.*;
import com.logpm.distribution.vo.app.StockupZeroVO;
import com.logpm.distribution.wrapper.DistributionStockupWrapper;
import com.logpm.trunkline.feign.ITrunklinePackageTrackLogClient;
import com.logpm.warehouse.entity.WarehouseGoodsAllocationEntity;
@ -70,9 +69,6 @@ import org.springblade.common.constant.reservation.ReservationLoadingStatusConst
import org.springblade.common.constant.reservation.ReservationOrderStatusConstant;
import org.springblade.common.constant.reservation.ReservationPackageStatusConstant;
import org.springblade.common.constant.reservation.ReservationSigningStatusConstant;
import org.springblade.common.constant.stocklist.StockLockingStatusConstant;
import org.springblade.common.constant.stocklist.StockSignfoStatusConstant;
import org.springblade.common.constant.stocklist.StockStatusConstant;
import org.springblade.common.constant.stockup.StockAssignStatusConstant;
import org.springblade.common.constant.stockup.StockupStatusConstant;
import org.springblade.common.constant.stockup.StockupTypeConstant;
@ -4341,7 +4337,9 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
return null;
}
private NodeFanoutMsg<StockUpVO> buildStockUpNodeData(DistributionStockupEntity distributionStockupEntity,DistributionReservationEntity reservationEntity, List<DistributionParcelListEntity> parcelListEntitys) {
@Override
public NodeFanoutMsg<StockUpVO> buildStockUpNodeData(DistributionStockupEntity distributionStockupEntity, DistributionReservationEntity reservationEntity, List<DistributionParcelListEntity> parcelListEntitys) {
try {
BladeUser user = AuthUtil.getUser();
NodeFanoutMsg<StockUpVO> nodeFanoutMsg = new NodeFanoutMsg<StockUpVO>();

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

@ -141,6 +141,7 @@ import org.springblade.common.model.NodeFanoutMsg;
import org.springblade.common.model.PackageData;
import org.springblade.common.model.workNode.DeliveryOfPickupPlanFeiVO;
import org.springblade.common.model.workNode.DeliveryOfPickupPlanVO;
import org.springblade.common.model.workNode.PickUpByReCheckVO;
import org.springblade.common.model.workNode.PickUpByScanVO;
import org.springblade.common.utils.CommonUtil;
import org.springblade.core.log.exception.ServiceException;
@ -3643,7 +3644,6 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
pickUpByScanVO.setPackageDataList(packageDataList);
billLadingScanEntities.forEach(t -> {
PackageData packageData = new PackageData();
if ("1".equals(t.getMaterialType())) {
@ -3802,6 +3802,8 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
List<DistributionPrintEntity> list1 = distributionPrintService.list(Wrappers.<DistributionPrintEntity>query().lambda()
.eq(DistributionPrintEntity::getBillLadingId, s)
);
List<DistributionBillLadingScanEntity> scanEntityList = new ArrayList<>();
if (list1.isEmpty()) {
return R.fail("请上传签收图片!!");
}
@ -3817,7 +3819,6 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
if (ladingScanEntities.isEmpty()) {
return R.fail("无签收数据!!");
}
//修改提货状态
DistrilbutionBillLadingEntity billLadingEntity = new DistrilbutionBillLadingEntity();
billLadingEntity.setConditions(BillLadingStatusConstant.yiqianshou.getValue());
@ -3880,7 +3881,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
}
}
} catch (Exception e) {
log.error("推送失败:{}", e);
log.error("推送失败", e);
}
for (DistributionBillLadingScanEntity ladingScanEntity : ladingScanEntities) {
// 签收发送消息到工厂
@ -3917,19 +3918,87 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
distributionAsyncService.sendFactorySignforInfo(s, myCurrentWarehouse, AuthUtil.getUser());
}
//处理库存品签收数据
updateStock(s);
updateStock(s, scanEntityList);
// 回传老系统自提数据
sendOldSystem(Long.parseLong(s));
//整理运单信息
handletrunklineWaybillSignLog(billLadingEntity.getId());
NodeFanoutMsg<PickUpByReCheckVO> nodeFanoutMsg = buildPickUpByReCheckVO(billLadingEntity, ladingScanEntities, myCurrentWarehouse);
iDistributionNodeWorkService.billofladingSignforCheck(nodeFanoutMsg, AuthUtil.getUser());
}
// 回传工厂数据
sendFactory(myCurrentWarehouse, parcelListIds);
return R.success("操作成功");
}
private NodeFanoutMsg<PickUpByReCheckVO> buildPickUpByReCheckVO(DistrilbutionBillLadingEntity billLadingEntity, List<DistributionBillLadingScanEntity> ladingScanEntities, BasicdataWarehouseEntity myCurrentWarehouse) {
NodeFanoutMsg<org.springblade.common.model.workNode.PickUpByReCheckVO> nodeFanoutMsg = new NodeFanoutMsg();
nodeFanoutMsg.setBizOperation(BizOperationEnums.ADD);
nodeFanoutMsg.setNode(WorkNodeEnums.SIGN_BILLOFLADING_REVIEW);
nodeFanoutMsg.setWarehouse(myCurrentWarehouse.getName());
nodeFanoutMsg.setWarehouseId(myCurrentWarehouse.getId());
nodeFanoutMsg.setOperator(AuthUtil.getNickName());
nodeFanoutMsg.setOperatorTime(new Date());
nodeFanoutMsg.setTenantId(myCurrentWarehouse.getTenantId());
PickUpByReCheckVO pickUpByReCheckVO = new PickUpByReCheckVO();
pickUpByReCheckVO.setPickupBatch(billLadingEntity.getPickupBatch());
List<PackageData> packageDataList = new ArrayList<>();
pickUpByReCheckVO.setPackageDataList(packageDataList);
ladingScanEntities.forEach(t -> {
PackageData packageData = new PackageData();
if ("1".equals(t.getMaterialType())) {
// 库存
Long stockListId = t.getStockListId();
DistributionStockListEntity byId = distributionStockListService.getById(stockListId);
if (byId != null) {
packageData.setPickupBatch(byId.getIncomingBatch());
packageData.setBrand(byId.getBrandName());
packageData.setMaterialName(byId.getDescriptionGoods());
packageData.setMallName(byId.getMallName());
packageData.setMaterialCode(byId.getCargoNumber());
packageData.setNumber(t.getQuantity());
packageData.setPackageType(PackageTypeEnums.INV);
}
} else if ("2".equals(t.getMaterialType())) {
//定制品
packageData.setPackageCode(t.getPacketBarCode());
packageData.setNumber(1);
packageData.setPackageType(PackageTypeEnums.CMP);
} else {
// 零担
packageData.setPackageType(PackageTypeEnums.LTL);
packageData.setNumber(t.getQuantity());
DistributionParcelListEntity byId = distributionParcelListService.getById(t.getParcelListId());
if (Func.isNotEmpty(byId)) {
packageData.setOrderCode(byId.getOrderCode());
if (Func.isEmpty(byId.getBrandName())) {
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(byId.getStockArticleId());
if (ObjectUtils.isNotNull(stockArticleEntity)) {
packageData.setBrand(stockArticleEntity.getBrand());
}
} else {
packageData.setBrand(byId.getBrandName());
}
packageData.setWaybillNumber(byId.getWaybillNumber());
packageData.setProductName(byId.getFirsts());
}
}
packageDataList.add(packageData);
});
nodeFanoutMsg.setMain(pickUpByReCheckVO);
return nodeFanoutMsg;
}
/**
* 自提签收推淞老系统
*
@ -4066,12 +4135,11 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
/**
* 处理提货库存品签收
*/
public void updateStock(String billId) {
public void updateStock(String billId, List<DistributionBillLadingScanEntity> scanEntityList) {
List<DisStockListDetailEntity> list = disStockListDetailService.list(Wrappers.<DisStockListDetailEntity>query().lambda()
.eq(DisStockListDetailEntity::getReservationId, billId));
if (ObjectUtils.isNotNull(list)) {
//处理库存
List<DistributionBillLadingScanEntity> scanEntityList = new ArrayList<>();
list.stream().filter(i -> "10".equals(i.getStockSignfoStatus())).forEach(i -> {
//添加自提库存品记录
DistributionBillLadingScanEntity billLadingScan = new DistributionBillLadingScanEntity();

Loading…
Cancel
Save