Browse Source

1.修改日志文件的保存路径

2.增加装车的的按照预约单分批发送
pre-production
pref_mail@163.com 4 months ago
parent
commit
39cc2d72d4
  1. 2
      blade-service/logpm-business/src/main/resources/logback.xml
  2. 361
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  3. 2
      blade-service/logpm-factory-data/logpm-factory-data-base/src/main/resources/logback.xml
  4. 2
      blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/resources/logback.xml
  5. 2
      blade-service/logpm-factory-data/logpm-factory-data-linsy/src/main/resources/logback.xml
  6. 2
      blade-service/logpm-factory-data/logpm-factory-data-mengtian/src/main/resources/logback.xml
  7. 2
      blade-service/logpm-factory-data/logpm-factory-data-mwh/src/main/resources/logback.xml
  8. 2
      blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/resources/logback.xml
  9. 2
      blade-service/logpm-factory-data/logpm-factory-data-oupai/src/main/resources/logback.xml
  10. 2
      blade-service/logpm-factory-data/logpm-factory-data-pan/src/main/resources/logback.xml
  11. 2
      blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/resources/logback.xml
  12. 2
      blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/resources/logback.xml
  13. 2
      blade-service/logpm-patch/src/main/resources/logback.xml
  14. 2
      blade-service/logpm-report/src/main/resources/logback.xml
  15. 2
      blade-service/logpm-statisticsdata/src/main/resources/logback.xml
  16. 2
      blade-service/logpm-supervise/src/main/resources/logback.xml

2
blade-service/logpm-business/src/main/resources/logback.xml

@ -2,7 +2,7 @@
<configuration scan="false" debug="false">
<contextName>logback</contextName>
<property name="log.path" value="../data/logpm-warehouse/logs/logs.log"/>
<property name="log.path" value="../data/logpm-business/logs/logs.log"/>
<!-- 彩色日志依赖的渲染类 -->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>

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

@ -39,126 +39,17 @@ import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataDriverArteryClient;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.distribution.bean.Resp;
import com.logpm.distribution.dto.DistributionCancelReservationPackageDTO;
import com.logpm.distribution.dto.DistributionDeliveryExcelDTO;
import com.logpm.distribution.dto.DistributionDeliveryListDTO;
import com.logpm.distribution.dto.DistributionDeliverySelfDTO;
import com.logpm.distribution.dto.DistributionDeliveryTripartiteDTO;
import com.logpm.distribution.dto.DistributionLoadingNumDTO;
import com.logpm.distribution.dto.DistributionParcelListDTO;
import com.logpm.distribution.dto.DistributionParcelNumberDTO;
import com.logpm.distribution.dto.DistributionReservationDTO;
import com.logpm.distribution.dto.DistributionStockArticleDTO;
import com.logpm.distribution.dto.DistributionStockupDTO;
import com.logpm.distribution.dto.PushNotificationDTO;
import com.logpm.distribution.dto.*;
import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO;
import com.logpm.distribution.dto.app.DistrilbutionloadingscanDTO;
import com.logpm.distribution.entity.DisStockListDetailEntity;
import com.logpm.distribution.entity.DistributionBillLadingScanEntity;
import com.logpm.distribution.entity.DistributionDeliveryChargeEntity;
import com.logpm.distribution.entity.DistributionDeliveryDetailsEntity;
import com.logpm.distribution.entity.DistributionDeliveryListEntity;
import com.logpm.distribution.entity.DistributionDeliverySelfEntity;
import com.logpm.distribution.entity.DistributionDeliveryTripartiteEntity;
import com.logpm.distribution.entity.DistributionLoadscanAbnormalEntity;
import com.logpm.distribution.entity.DistributionLoadscanEntity;
import com.logpm.distribution.entity.DistributionLoadscaninvnEntity;
import com.logpm.distribution.entity.DistributionPackadeliEntity;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionParcelNumberEntity;
import com.logpm.distribution.entity.DistributionPlanLogEntity;
import com.logpm.distribution.entity.DistributionReservationEntity;
import com.logpm.distribution.entity.DistributionReservationPackageEntity;
import com.logpm.distribution.entity.DistributionReservationStockarticleEntity;
import com.logpm.distribution.entity.DistributionReservationStocklistEntity;
import com.logpm.distribution.entity.DistributionReservationZeroPackageEntity;
import com.logpm.distribution.entity.DistributionRetentionScanEntity;
import com.logpm.distribution.entity.DistributionSigndetailEntity;
import com.logpm.distribution.entity.DistributionSignforEntity;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.entity.DistributionStockEntity;
import com.logpm.distribution.entity.DistributionStockListEntity;
import com.logpm.distribution.entity.DistributionStockupEntity;
import com.logpm.distribution.entity.DistributionStockupInfoEntity;
import com.logpm.distribution.entity.DistrilbutionBillLadingEntity;
import com.logpm.distribution.entity.DistrilbutionBillPackageEntity;
import com.logpm.distribution.entity.DistrilbutionBillStockEntity;
import com.logpm.distribution.entity.*;
import com.logpm.distribution.excel.DistributionDeliveryListExcel;
import com.logpm.distribution.mapper.DistributionDeliveryChargeMapper;
import com.logpm.distribution.mapper.DistributionDeliveryInfoMapper;
import com.logpm.distribution.mapper.DistributionDeliveryListMapper;
import com.logpm.distribution.mapper.DistributionDeliverySelfMapper;
import com.logpm.distribution.mapper.DistributionDeliveryTripartiteMapper;
import com.logpm.distribution.mapper.DistributionLoadscanMapper;
import com.logpm.distribution.mapper.DistributionLoadscaninvnMapper;
import com.logpm.distribution.mapper.DistributionParcelListMapper;
import com.logpm.distribution.mapper.DistributionReservationMapper;
import com.logpm.distribution.mapper.DistributionReservationPackageMapper;
import com.logpm.distribution.mapper.DistributionReservationStockarticleMapper;
import com.logpm.distribution.mapper.DistributionSignforMapper;
import com.logpm.distribution.mapper.DistributionStockArticleMapper;
import com.logpm.distribution.mapper.DistributionStockListMapper;
import com.logpm.distribution.mapper.DistributionStockMapper;
import com.logpm.distribution.mapper.DistributionStockupMapper;
import com.logpm.distribution.mapper.DistrilbutionBillLadingMapper;
import com.logpm.distribution.mapper.DistrilbutionBillPackageMapper;
import com.logpm.distribution.mapper.DistrilbutionBillStockMapper;
import com.logpm.distribution.service.IDisStockListDetailService;
import com.logpm.distribution.service.IDistributionAsyncService;
import com.logpm.distribution.service.IDistributionBillLadingScanService;
import com.logpm.distribution.service.IDistributionDeliveryDetailsService;
import com.logpm.distribution.service.IDistributionDeliveryListService;
import com.logpm.distribution.service.IDistributionDeliverySelfService;
import com.logpm.distribution.service.IDistributionDeliveryTripartiteService;
import com.logpm.distribution.service.IDistributionLoadscanAbnormalService;
import com.logpm.distribution.service.IDistributionNodeWorkService;
import com.logpm.distribution.service.IDistributionParcelListService;
import com.logpm.distribution.service.IDistributionParcelNumberService;
import com.logpm.distribution.service.IDistributionPlanLogService;
import com.logpm.distribution.service.IDistributionReservationPackageService;
import com.logpm.distribution.service.IDistributionReservationService;
import com.logpm.distribution.service.IDistributionReservationStockarticleService;
import com.logpm.distribution.service.IDistributionReservationStocklistService;
import com.logpm.distribution.service.IDistributionReservationZeroPackageService;
import com.logpm.distribution.service.IDistributionSignforService;
import com.logpm.distribution.service.IDistributionStockArticleService;
import com.logpm.distribution.service.IDistributionStockListService;
import com.logpm.distribution.service.IDistributionStockupInfoService;
import com.logpm.distribution.vo.DisStockListDetailVO;
import com.logpm.distribution.vo.DistributionDeliveryInfoVO;
import com.logpm.distribution.vo.DistributionDeliveryListPrintReponseVO;
import com.logpm.distribution.vo.DistributionDeliveryListPrintRequestVO;
import com.logpm.distribution.vo.DistributionDeliveryListVO;
import com.logpm.distribution.vo.DistributionDeliverySelfVO;
import com.logpm.distribution.vo.DistributionDeliveryTripartiteVO;
import com.logpm.distribution.vo.DistributionDeliveryWordVO;
import com.logpm.distribution.vo.DistributionOrderInfoVO;
import com.logpm.distribution.vo.DistributionParcelListVO;
import com.logpm.distribution.vo.DistributionParcelNumberVO;
import com.logpm.distribution.vo.DistributionReservationOrderPackageVO;
import com.logpm.distribution.vo.DistributionReservationStocklistVO;
import com.logpm.distribution.vo.DistributionRetentionScanVo;
import com.logpm.distribution.vo.DistributionStockArticleVO;
import com.logpm.distribution.vo.DistributionStockListVO;
import com.logpm.distribution.vo.DistributionStockupVO;
import com.logpm.distribution.vo.DistributionTrayRetentionVO;
import com.logpm.distribution.vo.DistributionstatisticsnmbVO;
import com.logpm.distribution.vo.app.DistributionAppDeliveryListVO;
import com.logpm.distribution.vo.app.DistributionAppDeliverySelfVO;
import com.logpm.distribution.vo.app.DistributionAppDetailVO;
import com.logpm.distribution.vo.app.DistributionAppNewDeliveryListVO;
import com.logpm.distribution.vo.app.DistributionAppNewReservationVO;
import com.logpm.distribution.vo.app.DistributionAppParcelListVO;
import com.logpm.distribution.vo.app.DistributionAppReservationVO;
import com.logpm.distribution.vo.app.DistributionAppStockArticleVO;
import com.logpm.distribution.vo.app.DistributionAppStockListVO;
import com.logpm.distribution.vo.app.DistributionRetentionScanVO;
import com.logpm.distribution.mapper.*;
import com.logpm.distribution.service.*;
import com.logpm.distribution.vo.*;
import com.logpm.distribution.vo.app.*;
import com.logpm.distribution.vo.print.PrintPreviewVO;
import com.logpm.distribution.wrapper.DistributionDeliveryListWrapper;
import com.logpm.distribution.wrapper.DistributionDisStockListWrapper;
import com.logpm.distribution.wrapper.DistributionParcelListWrapper;
import com.logpm.distribution.wrapper.DistributionReservationWrapper;
import com.logpm.distribution.wrapper.DistributionStockArticleWrapper;
import com.logpm.distribution.wrapper.*;
import com.logpm.factorydata.enums.BrandEnums;
import com.logpm.factorydata.util.FactoryDataMessageSender;
import com.logpm.factorydata.vo.NodePushMsg;
@ -168,13 +59,7 @@ import com.logpm.warehouse.entity.WarehouseConfigEntity;
import com.logpm.warehouse.entity.WarehouseRetentionScanEntity;
import com.logpm.warehouse.entity.WarehouseTrayGoodsEntity;
import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import com.logpm.warehouse.feign.IWarehouseConfigClient;
import com.logpm.warehouse.feign.IWarehouseRetentionScanClient;
import com.logpm.warehouse.feign.IWarehouseTrayGoodsClient;
import com.logpm.warehouse.feign.IWarehouseTrayTypeClient;
import com.logpm.warehouse.feign.IWarehouseUpdownStockUpAreaClient;
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
import com.logpm.warehouse.feign.IWarehouseWaybillClient;
import com.logpm.warehouse.feign.*;
import com.logpm.warehouse.vo.TrayTypeDataVO;
import lombok.extern.log4j.Log4j2;
import org.apache.commons.lang.StringUtils;
@ -192,27 +77,10 @@ import org.springblade.common.constant.common.IsOrNoConstant;
import org.springblade.common.constant.delivery.DeliveryLoadingStatusConstant;
import org.springblade.common.constant.delivery.DeliveryStartStatusConstant;
import org.springblade.common.constant.delivery.DeliveryStatusConstant;
import org.springblade.common.constant.loading.LoadScanSigningStatusConstant;
import org.springblade.common.constant.loading.LoadScanSigningTypeStatusConstant;
import org.springblade.common.constant.loading.LoadingAbnormalAuditingStatusConstant;
import org.springblade.common.constant.loading.LoadingAbnormalTypeConstant;
import org.springblade.common.constant.loading.LoadingIsInsertConstant;
import org.springblade.common.constant.loading.LoadingStatusConstant;
import org.springblade.common.constant.order.OrderStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageFreezeStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageGroundingStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageLoadingStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageReservationStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageStockupStatusConstant;
import org.springblade.common.constant.loading.*;
import org.springblade.common.constant.orderpackage.*;
import org.springblade.common.constant.printTemplate.PrintTemplateStatusConstant;
import org.springblade.common.constant.reservation.ReservationInventoryStatusConstant;
import org.springblade.common.constant.reservation.ReservationLoadingStatusConstant;
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.reservation.ReservationStatusConstant;
import org.springblade.common.constant.reservation.ReservationStockupStatusConstant;
import org.springblade.common.constant.reservation.*;
import org.springblade.common.constant.retention.RetentionSourceTypeConstant;
import org.springblade.common.constant.signing.SignforStatusConstant;
import org.springblade.common.constant.stockup.StockAssignStatusConstant;
@ -220,13 +88,7 @@ import org.springblade.common.constant.stockup.StockupStatusConstant;
import org.springblade.common.enums.BizOperationEnums;
import org.springblade.common.enums.PackageTypeEnums;
import org.springblade.common.exception.CustomerException;
import org.springblade.common.model.CarStartVO;
import org.springblade.common.model.DistributionLoadVO;
import org.springblade.common.model.DistributionTaskVO;
import org.springblade.common.model.NodeFanoutMsg;
import org.springblade.common.model.PackageData;
import org.springblade.common.model.PlanDriverbindCarVO;
import org.springblade.common.model.ReservationVO;
import org.springblade.common.model.*;
import org.springblade.common.model.workNode.FinishDistributionTrainVO;
import org.springblade.common.serviceConstant.ServiceConstant;
import org.springblade.common.utils.CommonUtil;
@ -263,17 +125,7 @@ import java.time.LocalDate;
import java.time.YearMonth;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Function;
import java.util.stream.Collectors;
@ -1274,8 +1126,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
DistributionDeliveryListEntity deliveryListEntity = distributionDeliveryListService.getById(distrilbutionloadingscanDTO.getDeliveryId());
NodeFanoutMsg<DistributionLoadVO> nodeFanoutMsg = buildNodeFanoutMsgByPackage(deliveryListEntity, pushNodeList);
distributionNodeWorkService.nodeLoading(nodeFanoutMsg, AuthUtil.getUser());
}
if (CollUtil.isNotEmpty(pushList)) {
@ -1325,8 +1176,30 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
return Resp.scanSuccessWithData("装车成功", carLaodNum + "件", carLaodNum);
}
/**
* 装车节点按照预约进行推送
* @param distributionDeliveryListEntity
* @param pushNodeList
*/
private void sendBuildNodeFanoutMsgByPackage(DistributionDeliveryListEntity distributionDeliveryListEntity, List<DistributionLoadscanEntity> pushNodeList){
// 提供预约单
Map<Long, List<DistributionLoadscanEntity>> collect = pushNodeList.stream().collect(Collectors.groupingBy(DistributionLoadscanEntity::getReservationId));
if(collect.isEmpty()){
return ;
}
Set<Long> keys = collect.keySet();
for (Long key : keys) {
List<DistributionLoadscanEntity> list = collect.get(key);
DistributionReservationEntity reservationEntity = distributionReservationMapper.selectById(key);
NodeFanoutMsg<DistributionLoadVO> nodeFanoutMsg = buildNodeFanoutMsgByPackageByReservationCode(distributionDeliveryListEntity, list, reservationEntity.getReservationCode());
distributionNodeWorkService.nodeLoading(nodeFanoutMsg, AuthUtil.getUser());
}
}
private NodeFanoutMsg<DistributionLoadVO> buildNodeFanoutMsgByPackage(DistributionDeliveryListEntity distributionDeliveryListEntity, List<DistributionLoadscanEntity> pushNodeList) {
private NodeFanoutMsg<DistributionLoadVO> buildNodeFanoutMsgByPackageByReservationCode(DistributionDeliveryListEntity distributionDeliveryListEntity, List<DistributionLoadscanEntity> pushNodeList,String reservationCode) {
NodeFanoutMsg<DistributionLoadVO> nodeFanoutMsg = new NodeFanoutMsg();
nodeFanoutMsg.setBizOperation(BizOperationEnums.ADD);
nodeFanoutMsg.setNode(WorkNodeEnums.DISTRIBUTION_LOADING);
@ -1337,6 +1210,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
// DistributionTaskVO taskVO = buildDistributionTaskVO(distributionDeliveryListEntity, AuthUtil.getUserId());
DistributionLoadVO distributionLoadVO = new DistributionLoadVO();
distributionLoadVO.setReservationCode(reservationCode);
List<PlanDriverbindCarVO> planDriverbindCarVOS = buildDeliveryCarDriverInfor(distributionDeliveryListEntity);
@ -1444,7 +1318,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
return jsonArray;
}
private NodeFanoutMsg<DistributionLoadVO> buildNodeFanoutMsgByStock(DistributionDeliveryListEntity distributionDeliveryListEntity, List<DistributionLoadscaninvnEntity> ts) {
private NodeFanoutMsg<DistributionLoadVO> buildNodeFanoutMsgByStock(DistributionDeliveryListEntity distributionDeliveryListEntity, List<DistributionLoadscaninvnEntity> ts,String reservationCode) {
NodeFanoutMsg<DistributionLoadVO> nodeFanoutMsg = new NodeFanoutMsg();
nodeFanoutMsg.setBizOperation(BizOperationEnums.ADD);
nodeFanoutMsg.setNode(WorkNodeEnums.DISTRIBUTION_LOADING);
@ -1456,7 +1330,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
// DistributionTaskVO taskVO = buildDistributionTaskVO(distributionDeliveryListEntity, AuthUtil.getUserId());
// nodeFanoutMsg.setMain(taskVO);
DistributionLoadVO distributionLoadVO = new DistributionLoadVO();
distributionLoadVO.setReservationCode(reservationCode);
List<PlanDriverbindCarVO> planDriverbindCarVOS = buildDeliveryCarDriverInfor(distributionDeliveryListEntity);
String driverName = distributionDeliveryListEntity.getDriverName();
@ -1514,33 +1388,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
@NotNull
private PackageData getPackageData(DistributionParcelListEntity parcelListEntity) {
PackageData packageData = new PackageData();
packageData.setWaybillNumber(parcelListEntity.getWaybillNumber());
packageData.setBrand(parcelListEntity.getBrandName());
packageData.setPackageCode(parcelListEntity.getOrderPackageCode());
packageData.setMaterialCode(parcelListEntity.getMaterialCode());
packageData.setMaterialName(parcelListEntity.getMaterialName());
packageData.setNumber(1);
packageData.setOrderCode(parcelListEntity.getOrderCode());
packageData.setPackageType(PackageTypeEnums.CMP);
return packageData;
}
private void extracteOrderPackageStatus(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO, DistributionParcelListEntity parcelListEntity, BasicdataWarehouseEntity myCurrentWarehouse, DistributionReservationEntity reservationEntity) {
Map<String, Object> map = new HashMap<>();
map.put("orderPackageCode", parcelListEntity.getOrderPackageCode());
map.put("warehouseId", myCurrentWarehouse.getId());
//包件配送下架
warehouseUpdownTypeClient.downDeliveryPackage(map);
//维护订单的信息
distributionStockArticleService.maintenanceOrderInfo(parcelListEntity.getOrderCode(), myCurrentWarehouse.getId());
//维护预约的信息
distributionReservationService.maintenanceReservationInfo(reservationEntity.getId());
//维护配送任务信息
distributionDeliveryListService.maintenanceDeliveryInfo(distrilbutionloadingscanDTO.getDeliveryId());
}
private Integer getCarLaodNum(Long deliveryId) {
@ -1561,65 +1410,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
@Transactional(isolation = Isolation.READ_UNCOMMITTED, rollbackFor = Exception.class)
public void changeDeliveryListStatuss(String barcode, Long deliveryId) {
//这里需要查询出该包件
DistributionParcelListEntity parcelListEntity = distributionDeliveryListMapper.getLoadingPackageDetails(barcode, deliveryId);
parcelListEntity.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.yizhuangche.getValue());
parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yichuku.getValue());
//修改包件状态
distributionParcelListService.updateById(parcelListEntity);
DistributionDeliveryListEntity deliveryListEntity = distributionDeliveryListMapper.selectOne(Wrappers.<DistributionDeliveryListEntity>query().lambda().eq(DistributionDeliveryListEntity::getId, deliveryId));
List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListService.getBaseMapper().selectList(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getStockArticleId, parcelListEntity.getStockArticleId()));
boolean flag = parcelListEntityList.stream().allMatch(p -> p.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.yizhuangche.getValue()));
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(parcelListEntity.getStockArticleId());
//维护包件、订单扫描装车状态
if (flag) {
stockArticleEntity.setOrderStatus(OrderStatusConstant.chuku.getValue());
} else {
flag = parcelListEntityList.stream().allMatch(p -> p.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.weizhuancghe.getValue()));
if (flag) {
stockArticleEntity.setOrderStatus(OrderStatusConstant.ruku.getValue());
} else {
stockArticleEntity.setOrderStatus(OrderStatusConstant.bufenchuku.getValue());
}
}
distributionStockArticleService.updateById(stockArticleEntity);
//维护包件、预约的扫描状态
//查询出配送任务下的所有包件
List<DistributionParcelListEntity> deliveryParcelListEntityList = distributionDeliveryListMapper.selectPackageListByDeliveryListId(deliveryId);
boolean deliveryLoadingFlag = deliveryParcelListEntityList.stream().allMatch(p -> p.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.yizhuangche.getValue()));
if (deliveryLoadingFlag) {
deliveryListEntity.setDeliveryListLoadingStatus(DeliveryLoadingStatusConstant.yizhuangche.getValue());
} else {
deliveryLoadingFlag = deliveryParcelListEntityList.stream().allMatch(p -> p.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.weizhuancghe.getValue()));
if (deliveryLoadingFlag) {
deliveryListEntity.setDeliveryListLoadingStatus(DeliveryLoadingStatusConstant.weizhuangche.getValue());
} else {
deliveryListEntity.setDeliveryListLoadingStatus(DeliveryLoadingStatusConstant.bunfenzhuangche.getValue());
}
}
distributionDeliveryListMapper.updateById(deliveryListEntity);
List<DistributionReservationEntity> reservationEntityList = distributionDeliveryListMapper.selectReservationByDeliveryListId(deliveryId);
reservationEntityList.forEach(r -> {
//查询预约下的所有包件信息
List<DistributionParcelListEntity> parcelListEntities = distributionReservationMapper.selectPackageListByReservationId(r.getId());
boolean reservationLoadingFlag = parcelListEntities.stream().allMatch(p -> p.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.yizhuangche.getValue()));
if (reservationLoadingFlag) {
r.setLoadingStatus(ReservationLoadingStatusConstant.yizhuangche.getValue());
} else {
reservationLoadingFlag = parcelListEntities.stream().allMatch(p -> p.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.weizhuancghe.getValue()));
if (reservationLoadingFlag) {
r.setLoadingStatus(ReservationLoadingStatusConstant.daizhuangche.getValue());
} else {
r.setLoadingStatus(ReservationLoadingStatusConstant.bufenzhuangche.getValue());
}
}
distributionReservationMapper.updateById(r);
});
}
@Override
@Transactional(isolation = Isolation.READ_COMMITTED, rollbackFor = Exception.class)
public R loadingack(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) {
@ -2036,24 +1826,39 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
DistributionDeliveryListVO deliveryList = distributionDeliveryListService.getDeliveryList(distrilbutionloadingscanDTO.getDeliveryId());
// 发送 订制品
if(Func.isNotEmpty(dingzhis)){
NodeFanoutMsg<DistributionLoadVO> nodeFanoutMsg = buildNodeFanoutMsgByPackage(deliveryList, dingzhis);
distributionNodeWorkService.nodeLoading(nodeFanoutMsg, AuthUtil.getUser());
sendBuildNodeFanoutMsgByPackage(deliveryList, dingzhis);
}
// 发库存
if(Func.isNotEmpty(kucuns)){
NodeFanoutMsg<DistributionLoadVO> nodeFanoutMsg = buildNodeFanoutMsgByStock(deliveryList, kucuns);
distributionNodeWorkService.nodeLoading(nodeFanoutMsg, AuthUtil.getUser());
sendBuildNodeFanoutMsgByStock(deliveryList, kucuns);
}
//发零担
if(Func.isNotEmpty(lingdans)){
NodeFanoutMsg<DistributionLoadVO> nodeFanoutMsg = buildNodeFanoutMsgByZeroOrder(deliveryList, lingdans);
distributionNodeWorkService.nodeLoading(nodeFanoutMsg, AuthUtil.getUser());
sendBuildNodeFanoutMsgByZeroOrder(deliveryList,lingdans);
}
return Resp.scanSuccess("操作成功", "装车成功");
}
private void sendBuildNodeFanoutMsgByStock(DistributionDeliveryListEntity distributionDeliveryListEntity, List<DistributionLoadscaninvnEntity> ts){
Map<Long, List<DistributionLoadscaninvnEntity>> collect = ts.stream().collect(Collectors.groupingBy(DistributionLoadscaninvnEntity::getReservationId));
return Resp.scanSuccess("操作成功", "装车成功");
if(collect.isEmpty()){
return;
}
Set<Long> keys = collect.keySet();
for (Long key : keys) {
List<DistributionLoadscaninvnEntity> list = collect.get(key);
DistributionReservationEntity reservationEntity = distributionReservationMapper.selectById(key);
NodeFanoutMsg<DistributionLoadVO> nodeFanoutMsg = buildNodeFanoutMsgByStock(distributionDeliveryListEntity, list,reservationEntity.getReservationCode());
distributionNodeWorkService.nodeLoading(nodeFanoutMsg, AuthUtil.getUser());
}
}
@Transactional(isolation = Isolation.READ_COMMITTED, rollbackFor = Exception.class)
@ -2268,9 +2073,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
}
// DistributionDeliveryListEntity deliveryListEntity = distributionDeliveryListService.getById(distrilbutionloadingscanDTO.getDeliveryId());
NodeFanoutMsg<DistributionLoadVO> nodeFanoutMsg = buildNodeFanoutMsgByStock(distributionDeliveryListEntity, ts);
distributionNodeWorkService.nodeLoading(nodeFanoutMsg, AuthUtil.getUser());
sendBuildNodeFanoutMsgByStock(distributionDeliveryListEntity,ts);
String msg = getLoadingMsg(distrilbutionloadingscanDTO);
return Resp.scanSuccess("扫描成功", msg);
}
@ -6291,8 +6094,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
// 发送作业节点数据
if (CollUtil.isNotEmpty(pushNodeList)) {
NodeFanoutMsg<DistributionLoadVO> nodeFanoutMsg = buildNodeFanoutMsgByPackage(deliveryListEntity, pushNodeList);
distributionNodeWorkService.abnormalLoading(nodeFanoutMsg, AuthUtil.getUser());
sendBuildNodeFanoutMsgByPackage(deliveryListEntity, pushNodeList);
}
return Resp.scanSuccess("操作成功", "异常" + abnormalTotal + "件");
}
@ -6672,15 +6474,30 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (CollUtil.isNotEmpty(pushNodeList)) {
DistributionDeliveryListEntity deliveryListEntity = distributionDeliveryListService.getById(distrilbutionloadingscanDTO.getDeliveryId());
NodeFanoutMsg<DistributionLoadVO> nodeFanoutMsg = buildNodeFanoutMsgByZeroOrder(deliveryListEntity, pushNodeList);
distributionNodeWorkService.nodeLoading(nodeFanoutMsg, AuthUtil.getUser());
sendBuildNodeFanoutMsgByZeroOrder(deliveryListEntity, pushNodeList);
}
return Resp.scanSuccess("装车成功", str.toString());
}
private NodeFanoutMsg<DistributionLoadVO> buildNodeFanoutMsgByZeroOrder(DistributionDeliveryListEntity distributionDeliveryListEntity, List<DistributionLoadscanEntity> pushNodeList) {
private void sendBuildNodeFanoutMsgByZeroOrder(DistributionDeliveryListEntity distributionDeliveryListEntity, List<DistributionLoadscanEntity> pushNodeList){
Map<Long, List<DistributionLoadscanEntity>> collect = pushNodeList.stream().collect(Collectors.groupingBy(DistributionLoadscanEntity::getReservationId));
if(collect.isEmpty()){
return;
}
Set<Long> keys = collect.keySet();
for (Long key : keys) {
List<DistributionLoadscanEntity> list = collect.get(key);
DistributionReservationEntity reservationEntity = distributionReservationMapper.selectById(key);
NodeFanoutMsg<DistributionLoadVO> nodeFanoutMsg = buildNodeFanoutMsgByZeroOrderByReservationCode(distributionDeliveryListEntity, list,reservationEntity.getReservationCode());
distributionNodeWorkService.nodeLoading(nodeFanoutMsg, AuthUtil.getUser());
}
}
private NodeFanoutMsg<DistributionLoadVO> buildNodeFanoutMsgByZeroOrderByReservationCode(DistributionDeliveryListEntity distributionDeliveryListEntity, List<DistributionLoadscanEntity> pushNodeList,String reservationCode) {
NodeFanoutMsg<DistributionLoadVO> nodeFanoutMsg = new NodeFanoutMsg();
nodeFanoutMsg.setBizOperation(BizOperationEnums.ADD);
nodeFanoutMsg.setNode(WorkNodeEnums.DISTRIBUTION_LOADING);
@ -6689,10 +6506,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
nodeFanoutMsg.setOperator(AuthUtil.getNickName());
nodeFanoutMsg.setOperatorTime(new Date());
// DistributionTaskVO taskVO = buildDistributionTaskVO(distributionDeliveryListEntity, AuthUtil.getUserId());
DistributionLoadVO distributionLoadVO = new DistributionLoadVO();
distributionLoadVO.setReservationCode(reservationCode);
List<PlanDriverbindCarVO> planDriverbindCarVOS = buildDeliveryCarDriverInfor(distributionDeliveryListEntity);
String driverName = distributionDeliveryListEntity.getDriverName();
@ -9423,8 +9238,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
inventoryJsonObject.put("remark", "装车下架");
jsonObjects.add(inventoryJsonObject);
if (CollUtil.isNotEmpty(ts)) {
NodeFanoutMsg<DistributionLoadVO> nodeFanoutMsg = buildNodeFanoutMsgByStock(deliveryListEntity, ts);
distributionNodeWorkService.nodeLoading(nodeFanoutMsg, AuthUtil.getUser());
sendBuildNodeFanoutMsgByStock(deliveryListEntity,ts);
}
break;
case 4:
@ -9581,8 +9395,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
if (CollUtil.isNotEmpty(pushNodeList)) {
NodeFanoutMsg<DistributionLoadVO> nodeFanoutMsg = buildNodeFanoutMsgByPackage(deliveryListEntity, pushNodeList);
distributionNodeWorkService.nodeLoading(nodeFanoutMsg, AuthUtil.getUser());
sendBuildNodeFanoutMsgByPackage(deliveryListEntity, pushNodeList);
}
//维护订单数量
if (!orderCodes.isEmpty()) {

2
blade-service/logpm-factory-data/logpm-factory-data-base/src/main/resources/logback.xml

@ -2,7 +2,7 @@
<configuration scan="false" debug="false">
<contextName>logback</contextName>
<property name="log.path" value="./data/logpm-basic/logs/logs.log"/>
<property name="log.path" value="./data/logpm-factory-data-base/logs/logs.log"/>
<!-- 彩色日志依赖的渲染类 -->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>

2
blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/resources/logback.xml

@ -2,7 +2,7 @@
<configuration scan="false" debug="false">
<contextName>logback</contextName>
<property name="log.path" value="./data/logpm-basic/logs/logs.log"/>
<property name="log.path" value="./data/logpm-factory-data-jinpai/logs/logs.log"/>
<!-- 彩色日志依赖的渲染类 -->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>

2
blade-service/logpm-factory-data/logpm-factory-data-linsy/src/main/resources/logback.xml

@ -2,7 +2,7 @@
<configuration scan="false" debug="false">
<contextName>logback</contextName>
<property name="log.path" value="./data/logpm-basic/logs/logs.log"/>
<property name="log.path" value="./data/logpm-factory-data-linsy/logs/logs.log"/>
<!-- 彩色日志依赖的渲染类 -->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>

2
blade-service/logpm-factory-data/logpm-factory-data-mengtian/src/main/resources/logback.xml

@ -2,7 +2,7 @@
<configuration scan="false" debug="false">
<contextName>logback</contextName>
<property name="log.path" value="./data/logpm-basic/logs/logs.log"/>
<property name="log.path" value="./data/logpm-factory-data-mengtian/logs/logs.log"/>
<!-- 彩色日志依赖的渲染类 -->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>

2
blade-service/logpm-factory-data/logpm-factory-data-mwh/src/main/resources/logback.xml

@ -2,7 +2,7 @@
<configuration scan="false" debug="false">
<contextName>logback</contextName>
<property name="log.path" value="./data/logpm-basic/logs/logs.log"/>
<property name="log.path" value="./data/logpm-factory-data-mwh/logs/logs.log"/>
<!-- 彩色日志依赖的渲染类 -->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>

2
blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/resources/logback.xml

@ -2,7 +2,7 @@
<configuration scan="false" debug="false">
<contextName>logback</contextName>
<property name="log.path" value="./data/logpm-basic/logs/logs.log"/>
<property name="log.path" value="./data/logpm-factory-data-olo/logs/logs.log"/>
<!-- 彩色日志依赖的渲染类 -->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>

2
blade-service/logpm-factory-data/logpm-factory-data-oupai/src/main/resources/logback.xml

@ -2,7 +2,7 @@
<configuration scan="false" debug="false">
<contextName>logback</contextName>
<property name="log.path" value="./data/logpm-basic/logs/logs.log"/>
<property name="log.path" value="./data/logpm-factory-data-oupai/logs/logs.log"/>
<!-- 彩色日志依赖的渲染类 -->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>

2
blade-service/logpm-factory-data/logpm-factory-data-pan/src/main/resources/logback.xml

@ -2,7 +2,7 @@
<configuration scan="false" debug="false">
<contextName>logback</contextName>
<property name="log.path" value="./data/logpm-basic/logs/logs.log"/>
<property name="log.path" value="./data/logpm-factory-data-pan/logs/logs.log"/>
<!-- 彩色日志依赖的渲染类 -->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>

2
blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/resources/logback.xml

@ -2,7 +2,7 @@
<configuration scan="false" debug="false">
<contextName>logback</contextName>
<property name="log.path" value="./data/logpm-basic/logs/logs.log"/>
<property name="log.path" value="./data/logpm-factory-data-suofeiya/logs/logs.log"/>
<!-- 彩色日志依赖的渲染类 -->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>

2
blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/resources/logback.xml

@ -2,7 +2,7 @@
<configuration scan="false" debug="false">
<contextName>logback</contextName>
<property name="log.path" value="./data/logpm-basic/logs/logs.log"/>
<property name="log.path" value="./data/logpm-factory-data-zbom/logs/logs.log"/>
<!-- 彩色日志依赖的渲染类 -->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>

2
blade-service/logpm-patch/src/main/resources/logback.xml

@ -2,7 +2,7 @@
<configuration scan="false" debug="false">
<contextName>logback</contextName>
<property name="log.path" value="../data/applogs/ogpm-patch-xxljob/xxl-job-executor-sample-springboot.log"/>
<property name="log.path" value="../data/applogs/ogpm-patch/logs/logs.log"/>
<!-- 彩色日志依赖的渲染类 -->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>

2
blade-service/logpm-report/src/main/resources/logback.xml

@ -2,7 +2,7 @@
<configuration scan="false" debug="false">
<contextName>logback</contextName>
<property name="log.path" value="./data/logpm-basic/logs/logs.log"/>
<property name="log.path" value="./data/logpm-report/logs/logs.log"/>
<!-- 彩色日志依赖的渲染类 -->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>

2
blade-service/logpm-statisticsdata/src/main/resources/logback.xml

@ -2,7 +2,7 @@
<configuration scan="false" debug="false">
<contextName>logback</contextName>
<property name="log.path" value="../data/applogs/ogpm-factory-xxljob/xxl-job-executor-sample-springboot.log"/>
<property name="log.path" value="../data/applogs/logpm-statisticsdata/logs/logs.log"/>
<!-- 彩色日志依赖的渲染类 -->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>

2
blade-service/logpm-supervise/src/main/resources/logback.xml

@ -2,7 +2,7 @@
<configuration scan="false" debug="false">
<contextName>logback</contextName>
<property name="log.path" value="./data/logpm-basic/logs/logs.log"/>
<property name="log.path" value="./data/logpm-supervise/logs/logs.log"/>
<!-- 彩色日志依赖的渲染类 -->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>

Loading…
Cancel
Save