Browse Source

Merge remote-tracking branch 'origin/dist.1.2.0' into dist.1.2.0

dist.1.3.0
汤建军 7 months ago
parent
commit
42631834cb
  1. 11
      blade-biz-common/src/main/java/org/springblade/common/constant/OperatModeConstant.java
  2. 4
      blade-biz-common/src/main/java/org/springblade/common/model/DistributionSignforVO.java
  3. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  4. 15
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionNodeWorkServiceImpl.java
  5. 25
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

11
blade-biz-common/src/main/java/org/springblade/common/constant/OperatModeConstant.java

@ -0,0 +1,11 @@
package org.springblade.common.constant;
/**
* 操作方式常量类
*/
public interface OperatModeConstant {
public static final String SCAN = "扫描";
public static final String BATCH = "批量";
}

4
blade-biz-common/src/main/java/org/springblade/common/model/DistributionSignforVO.java

@ -33,6 +33,10 @@ public class DistributionSignforVO implements Serializable {
*/
private String reservationCode;
/**
* 操作方式 扫描 | 批量
*/
private String operatMode;
/**
* 预约数据列表
* 包含包件 零担 库存破

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

@ -3596,8 +3596,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
DistributionTaskVO distributionTaskVO = new DistributionTaskVO();
distributionTaskVO.setId(distributionDeliveryListEntity.getId());
distributionTaskVO.setTrainNumber(distributionDeliveryListEntity.getTrainNumber());
distributionTaskVO.setKind(distributionDeliveryListEntity.getKind());
distributionTaskVO.setType(distributionDeliveryListEntity.getType());
String kindName = distributionDeliveryListEntity.getKind().equals(ServiceConstant.DELIVERLIST_KIND_SELF) ? "自主配送" : "三方配送";
String typeName = distributionDeliveryListEntity.getType().equals("2") ? "市配" : "商配";
distributionTaskVO.setKind(kindName);
distributionTaskVO.setType(typeName);
distributionTaskVO.setDistributionCompany(distributionDeliveryListEntity.getDistributionCompany());
distributionTaskVO.setTaskTime(distributionDeliveryListEntity.getTaskTime());

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

@ -132,21 +132,6 @@ public class DistributionNodeWorkServiceImpl implements IDistributionNodeWorkSer
@Override
public void signFor(DistributionParcelListEntity parcelListEntity, Long taskId, String operationTime, String destinationWarehouse) {
// log.info(">>>>>>>>>> signFor 签收扫描 {}", parcelListEntity.getOrderPackageCode());
// BroadcastNodeData broadcastNodeData = new BroadcastNodeData();
// broadcastNodeData.put("orderPackageCode", parcelListEntity.getOrderPackageCode());
// broadcastNodeData.put("distributionContactId", taskId);
//// broadcastNodeData.put("distributionContactCode", distributionReservationEntity.getReservationCode());
// broadcastNodeData.put("destinationWarehouse", destinationWarehouse);
// broadcastNodeData.put("brand", parcelListEntity.getBrandName());
// broadcastNodeData.setOperationTime(operationTime);
// broadcastNodeData.setUserName(AuthUtil.getUserName());
// broadcastNodeData.setTenantId(AuthUtil.getTenantId());
//
// FanoutMsg build = FanoutMsg.builder().msg(broadcastNodeData.toJSONString())
// .exchange(FanoutConstants.distribution.signfor.EXCHANGE).build();
//
// sendFanoutMsg(build);
try {
JSONObject main = new JSONObject();
main.set("boId", taskId.toString());

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

@ -61,12 +61,9 @@ import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.jetbrains.annotations.NotNull;
import org.springblade.common.constant.DistributionTypeConstant;
import org.springblade.common.constant.*;
import org.springblade.common.constant.Inventory.InventoryLoadingStatusConstant;
import org.springblade.common.constant.Inventory.InventorySigningStatusConstant;
import org.springblade.common.constant.RabbitConstant;
import org.springblade.common.constant.RedisKeyConstant;
import org.springblade.common.constant.WorkNodeEnums;
import org.springblade.common.constant.billLading.BillLadingStatusConstant;
import org.springblade.common.constant.common.IsOrNoConstant;
import org.springblade.common.constant.delivery.DeliveryLoadingStatusConstant;
@ -2914,7 +2911,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
// 构建新作业节点回传
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVO(deliveryListEntity, distributionReservationEntity, pushList);
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVO(deliveryListEntity, distributionReservationEntity, pushList, OperatModeConstant.SCAN);
iDistributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser());
@ -2927,7 +2924,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
private NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> buildDistributionSignforVOByStock(DistributionDeliveryListEntity distributionDeliveryListEntity, List<DistributionLoadscaninvnEntity> pushList) {
private NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> buildDistributionSignforVOByStock(DistributionDeliveryListEntity distributionDeliveryListEntity, List<DistributionLoadscaninvnEntity> pushList,String operatMode) {
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = new NodeFanoutMsg();
nodeFanoutMsg.setBizOperation(BizOperationEnums.ADD);
@ -2972,13 +2969,14 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
distributionLoadVO.setPackageDataList(data);
distributionLoadVO.setOperatMode(operatMode);
nodeFanoutMsg.setMain(distributionLoadVO);
return nodeFanoutMsg;
}
private NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> buildDistributionSignforVO(DistributionDeliveryListEntity distributionDeliveryListEntity, DistributionReservationEntity distributionReservationEntity, List<DistributionLoadscanEntity> pushList) {
private NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> buildDistributionSignforVO(DistributionDeliveryListEntity distributionDeliveryListEntity, DistributionReservationEntity distributionReservationEntity, List<DistributionLoadscanEntity> pushList,String operatMode) {
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = new NodeFanoutMsg();
nodeFanoutMsg.setBizOperation(BizOperationEnums.ADD);
@ -2997,6 +2995,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadVO.setReservationCode(distributionReservationEntity.getReservationCode());
distributionLoadVO.setTrainNumber(distributionDeliveryListEntity.getTrainNumber());
distributionLoadVO.setReservationId(distributionReservationEntity.getId());
distributionLoadVO.setOperatMode(operatMode);
List<PackageData> data = new ArrayList<>();
@ -3358,7 +3357,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
// 推送作业节点
// 作业节点数据推送
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVO(deliveryListEntity, distributionReservationEntity, pushDatas);
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVO(deliveryListEntity, distributionReservationEntity, pushDatas,OperatModeConstant.BATCH);
iDistributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser());
@ -3813,7 +3812,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
// 作业节点数据推送
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVO(distributionDeliveryListEntity, reservationEntity, pushList);
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVO(distributionDeliveryListEntity, reservationEntity, pushList,OperatModeConstant.SCAN);
iDistributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser());
return Resp.scanSuccess("操作成功", s);
@ -4196,7 +4195,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
// 作业节点数据推送
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVOByStock(deliveryListEntity, pushList);
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVOByStock(deliveryListEntity, pushList,OperatModeConstant.SCAN);
iDistributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser());
@ -7625,7 +7624,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
// 节点作业推送
sendNodeWorkDataBroadcast(parcelListEntity, reservationEntity, singleTime, myCurrentWarehouse);
// 构建新作业节点回传
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVO(deliveryListEntity,reservationEntity, pushList);
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVO(deliveryListEntity,reservationEntity, pushList,OperatModeConstant.BATCH);
iDistributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser());
break;
case 2:
@ -7948,12 +7947,12 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (!pushInventoryList.isEmpty()) {
// 作业节点数据推送
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVOByStock(deliveryListEntity, pushInventoryList);
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVOByStock(deliveryListEntity, pushInventoryList, OperatModeConstant.SCAN);
iDistributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser());
}
if (!pushList.isEmpty()) {
// 构建新作业节点回传
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVO(deliveryListEntity,reservationEntity, pushList);
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVO(deliveryListEntity,reservationEntity, pushList,OperatModeConstant.SCAN);
iDistributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser());
}
if (!orderCodes.isEmpty()) {

Loading…
Cancel
Save