Browse Source

Merge remote-tracking branch 'origin/master'

master
pref_mail@163.com 3 months ago
parent
commit
932d84f89e
  1. 2
      blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/entity/ExpenseDispatchTrainDetailEntity.java
  2. 23
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/ITrunklineCarsLoadLineClient.java
  3. 5
      blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicNoticeController.java
  4. 177
      blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/impl/LogpmDataSearchServiceImpl.java
  5. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java
  6. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  7. 13
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  8. 22
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  9. 88
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  10. 54
      blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/job/AuthPushJob.java
  11. 18
      blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/mq/NodeDataPushListener.java
  12. 124
      blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/entity/FactoryNodePushEntity.java
  13. 16
      blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/mapper/FactoryNodePushMapper.java
  14. 5
      blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/mapper/FactoryNodePushMapper.xml
  15. 14
      blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/service/FactoryNodePushService.java
  16. 50
      blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/service/impl/FactoryDataServiceImpl.java
  17. 22
      blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/service/impl/FactoryNodePushServiceImpl.java
  18. 2
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportPackgeStartTimeVO.java
  19. 20
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/feign/TrunklineCarsLoadLineClient.java
  20. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/AdvanceOrderMqServiceImpl.java
  21. 26
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  22. 23
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

2
blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/entity/ExpenseDispatchTrainDetailEntity.java

@ -73,7 +73,7 @@ public class ExpenseDispatchTrainDetailEntity extends TenantEntity {
* 配送日期
*/
@ApiModelProperty(value = "配送日期")
@ExcelProperty("车次号")
@ExcelProperty("配送日期")
private String deliveryDate;
/**
* 车次完成时间

23
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/ITrunklineCarsLoadLineClient.java

@ -0,0 +1,23 @@
package com.logpm.trunkline.feign;
import com.logpm.trunkline.entity.TrunklineCarsLoadLineEntity;
import org.springblade.common.constant.ModuleNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
@FeignClient(
value = ModuleNameConstant.APPLICATION_TRUNKLINE_NAME
)
public interface ITrunklineCarsLoadLineClient {
String API_PREFIX = "trunklineCarsLoadLine/client";
@GetMapping(API_PREFIX+"/findListByLoadId")
List<TrunklineCarsLoadLineEntity> findListByLoadId(@RequestParam Long loadId);
}

5
blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicNoticeController.java

@ -16,6 +16,7 @@
*/
package com.logpm.basic.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.basic.entity.BasicNotice;
@ -95,7 +96,9 @@ public class BasicNoticeController extends BladeController {
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入notice")
public R<List<BasicNoticeVO>> list() {
List<BasicNotice> list = noticeService.list();
LambdaQueryWrapper<BasicNotice> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.orderByDesc(BasicNotice::getReleaseTime);
List<BasicNotice> list = noticeService.list(lambdaQueryWrapper);
List<BasicNoticeVO> data = new ArrayList<>();
for (BasicNotice notice : list) {
BasicNoticeVO vo = BasicNoticeWrapper.build().entityVO(notice);

177
blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/impl/LogpmDataSearchServiceImpl.java

@ -10,8 +10,10 @@ import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.QualityDeliverEntity;
import com.logpm.distribution.feign.IDistributionParcelListClient;
import com.logpm.distribution.feign.IQualityDeliverClient;
import com.logpm.trunkline.entity.TrunklineCarsLoadLineEntity;
import com.logpm.trunkline.entity.TrunklineCarsLoadScanEntity;
import com.logpm.trunkline.entity.TrunklineWaybillOrderEntity;
import com.logpm.trunkline.feign.ITrunklineCarsLoadLineClient;
import com.logpm.trunkline.feign.ITrunklineCarsLoadScanClient;
import com.logpm.trunkline.feign.ITrunklineWaybillOrderClient;
import com.logpm.warehouse.entity.WarehouseWaybillEntity;
@ -41,6 +43,7 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService {
private final IBasicdataWarehouseClient basicdataWarehouseClient;
private final ISysClient systemClient;
private final ITrunklineWaybillOrderClient trunklineWaybillOrderClient;
private final ITrunklineCarsLoadLineClient traceCarsLoadLineClient;
@Override
public R data(String type, String order) {
@ -140,18 +143,23 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService {
if (allListByWaybillNo != null && !allListByWaybillNo.isEmpty()) {
// 按照 车次号进行分组
Map<String, List<TrunklineCarsLoadScanEntity>> groupedByLoadId = allListByWaybillNo.stream().collect(Collectors.groupingBy(TrunklineCarsLoadScanEntity::getLoadCode));
Set<String> strings = groupedByLoadId.keySet();
for (String key : strings) {
Map<Long, List<TrunklineCarsLoadScanEntity>> groupedByLoadId = allListByWaybillNo.stream().collect(Collectors.groupingBy(TrunklineCarsLoadScanEntity::getLoadId));
Set<Long> strings = groupedByLoadId.keySet();
for (Long key : strings) {
// 查询改车次所有卸车作业数据集合
List<TrunklineCarsLoadLineEntity> listByLoadId = traceCarsLoadLineClient.findListByLoadId(key);
List<TrunklineCarsLoadScanEntity> trunklineCarsLoadScanEntities = groupedByLoadId.get(key);
//干线发车
nodeInfoVO = buildTrunklineByLoadCar(trunklineCarsLoadScanEntities, key);
nodeInfoVO = buildTrunklineByLoadCar(trunklineCarsLoadScanEntities, listByLoadId );
if (nodeInfoVO != null) {
nodeInfoVOList.add(nodeInfoVO);
}
// 干线到达
nodeInfoVO = buildTrunklineByUnLoadCar(trunklineCarsLoadScanEntities, key);
nodeInfoVO = buildTrunklineByUnLoadCar(trunklineCarsLoadScanEntities, listByLoadId);
if (nodeInfoVO != null) {
nodeInfoVOList.add(nodeInfoVO);
}
@ -165,47 +173,58 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService {
if (signListByWaybillNumber != null && !signListByWaybillNumber.isEmpty()) {
//统计装车数量load_num
int loadNum = signListByWaybillNumber.stream().mapToInt(QualityDeliverEntity::getLoadNum).sum();
int loadNum = signListByWaybillNumber.stream().filter(e -> e.getLoadNum() !=null).mapToInt(QualityDeliverEntity::getLoadNum).sum();
// 计划配送数 plan_num
int planNum = signListByWaybillNumber.stream().mapToInt(QualityDeliverEntity::getPlanNum).sum();
int planNum = signListByWaybillNumber.stream().filter(e-> e.getPlanNum()!=null).mapToInt(QualityDeliverEntity::getPlanNum).sum();
// 计算签收数量sign_num
int signNum = signListByWaybillNumber.stream().mapToInt(QualityDeliverEntity::getSignNum).sum();
int signNum = signListByWaybillNumber.stream().filter(e-> e.getSignNum()!=null).mapToInt(QualityDeliverEntity::getSignNum).sum();
// 配送装车
QualityDeliverEntity qualityDeliverEntity = signListByWaybillNumber.get(0);
if (loadNum != 0) {
nodeInfoVO = new NodeInfoVO();
nodeInfoVO.setOperateName("配送装车");
nodeInfoVO.setOperateNumber(loadNum + "");
nodeInfoVO.setOperateWarehouseName(qualityDeliverEntity.getWarehouseName());
nodeInfoVO.setOperateTime(qualityDeliverEntity.getCreateTime());
// 增加网点电话
BasicdataWarehouseEntity entityWarehouseId = basicdataWarehouseClient.getEntityWarehouseId(qualityDeliverEntity.getWarehouseId());
if (entityWarehouseId != null) {
nodeInfoVO.setOperateWarehousePhone(entityWarehouseId.getContactNumber());
QualityDeliverEntity qualityDeliverEntity = signListByWaybillNumber.stream().filter(e -> e.getLoadTime() != null).findFirst().orElse(null);
if(qualityDeliverEntity != null){
nodeInfoVO = new NodeInfoVO();
nodeInfoVO.setOperateName("配送装车");
nodeInfoVO.setOperateNumber(loadNum + "");
nodeInfoVO.setOperateWarehouseName(qualityDeliverEntity.getWarehouseName());
nodeInfoVO.setOperateTime(qualityDeliverEntity.getLoadTime());
// 增加网点电话
BasicdataWarehouseEntity entityWarehouseId = basicdataWarehouseClient.getEntityWarehouseId(qualityDeliverEntity.getWarehouseId());
if (entityWarehouseId != null) {
nodeInfoVO.setOperateWarehousePhone(entityWarehouseId.getContactNumber());
}
nodeInfoVOList.add(nodeInfoVO);
}
nodeInfoVOList.add(nodeInfoVO);
}
if (planNum != 0) {
nodeInfoVO = new NodeInfoVO();
nodeInfoVO.setOperateName("配送签收");
nodeInfoVO.setOperateNumber(signNum + "/" + loadNum);
nodeInfoVO.setOperateWarehouseName(qualityDeliverEntity.getWarehouseName());
nodeInfoVO.setOperateTime(qualityDeliverEntity.getCreateTime());
// 增加网点电话
BasicdataWarehouseEntity entityWarehouseId = basicdataWarehouseClient.getEntityWarehouseId(qualityDeliverEntity.getWarehouseId());
if (entityWarehouseId != null) {
nodeInfoVO.setOperateWarehousePhone(entityWarehouseId.getContactNumber());
if (signNum != 0) {
QualityDeliverEntity qualityDeliverEntity = signListByWaybillNumber.stream().filter(e -> e.getSignTime() != null).findFirst().orElse(null);
if(qualityDeliverEntity != null){
nodeInfoVO = new NodeInfoVO();
nodeInfoVO.setOperateName("配送签收");
nodeInfoVO.setOperateNumber(signNum + "/" + loadNum);
nodeInfoVO.setOperateWarehouseName(qualityDeliverEntity.getWarehouseName());
nodeInfoVO.setOperateTime(qualityDeliverEntity.getSignTime());
// 增加网点电话
BasicdataWarehouseEntity entityWarehouseId = basicdataWarehouseClient.getEntityWarehouseId(qualityDeliverEntity.getWarehouseId());
if (entityWarehouseId != null) {
nodeInfoVO.setOperateWarehousePhone(entityWarehouseId.getContactNumber());
}
nodeInfoVOList.add(nodeInfoVO);
}
nodeInfoVOList.add(nodeInfoVO);
}
}
//对nodeInfoVOList集合中的作业时间 按照 时间倒序排序
nodeInfoVOList.sort(Comparator.comparing(NodeInfoVO::getOperateTime).reversed());
result.setNodeInfoVOList(nodeInfoVOList);
// 配送签收
@ -296,18 +315,20 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService {
log.info( ">> allListByWaybillNo ={}",allListByWaybillNo);
if (allListByWaybillNo != null && !allListByWaybillNo.isEmpty()) {
// 按照 车次号进行分组
Map<String, List<TrunklineCarsLoadScanEntity>> groupedByLoadId = allListByWaybillNo.stream().collect(Collectors.groupingBy(TrunklineCarsLoadScanEntity::getLoadCode));
Set<String> strings = groupedByLoadId.keySet();
for (String key : strings) {
Map<Long, List<TrunklineCarsLoadScanEntity>> groupedByLoadId = allListByWaybillNo.stream().collect(Collectors.groupingBy(TrunklineCarsLoadScanEntity::getLoadId));
Set<Long> strings = groupedByLoadId.keySet();
for (Long key : strings) {
//
List<TrunklineCarsLoadLineEntity> listByLoadId = traceCarsLoadLineClient.findListByLoadId(key);
List<TrunklineCarsLoadScanEntity> trunklineCarsLoadScanEntities = groupedByLoadId.get(key);
//干线发车
nodeInfoVO = buildTrunklineByLoadCar(trunklineCarsLoadScanEntities, key);
nodeInfoVO = buildTrunklineByLoadCar(trunklineCarsLoadScanEntities, listByLoadId);
if (nodeInfoVO != null) {
nodeInfoVOList.add(nodeInfoVO);
}
// 干线到达
nodeInfoVO = buildTrunklineByUnLoadCar(trunklineCarsLoadScanEntities, key);
nodeInfoVO = buildTrunklineByUnLoadCar(trunklineCarsLoadScanEntities, listByLoadId);
if (nodeInfoVO != null) {
nodeInfoVOList.add(nodeInfoVO);
}
@ -330,45 +351,60 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService {
int signNum = signListByWaybillNumber.stream().filter(t-> t.getSignNum()!=null).mapToInt(QualityDeliverEntity::getSignNum).sum();
// 配送装车
QualityDeliverEntity qualityDeliverEntity = signListByWaybillNumber.get(0);
// QualityDeliverEntity qualityDeliverEntity = signListByWaybillNumber.get(0);
if (loadNum != 0) {
nodeInfoVO = new NodeInfoVO();
nodeInfoVO.setOperateName("配送装车");
nodeInfoVO.setOperateNumber(loadNum + "");
nodeInfoVO.setOperateWarehouseName(qualityDeliverEntity.getWarehouseName());
nodeInfoVO.setOperateTime(qualityDeliverEntity.getCreateTime());
// 增加网点电话
BasicdataWarehouseEntity entityWarehouseId = basicdataWarehouseClient.getEntityWarehouseId(qualityDeliverEntity.getWarehouseId());
if (entityWarehouseId != null) {
nodeInfoVO.setOperateWarehousePhone(entityWarehouseId.getContactNumber());
QualityDeliverEntity qualityDeliverEntity = signListByWaybillNumber.stream().filter(e -> e.getLoadTime() != null).findFirst().orElse(null);
if(qualityDeliverEntity != null){
nodeInfoVO = new NodeInfoVO();
nodeInfoVO.setOperateName("配送装车");
nodeInfoVO.setOperateNumber(loadNum + "");
nodeInfoVO.setOperateWarehouseName(qualityDeliverEntity.getWarehouseName());
nodeInfoVO.setOperateTime(qualityDeliverEntity.getLoadTime());
// 增加网点电话
BasicdataWarehouseEntity entityWarehouseId = basicdataWarehouseClient.getEntityWarehouseId(qualityDeliverEntity.getWarehouseId());
if (entityWarehouseId != null) {
nodeInfoVO.setOperateWarehousePhone(entityWarehouseId.getContactNumber());
}
nodeInfoVOList.add(nodeInfoVO);
}
nodeInfoVOList.add(nodeInfoVO);
}
if (planNum != 0) {
nodeInfoVO = new NodeInfoVO();
nodeInfoVO.setOperateName("配送签收");
nodeInfoVO.setOperateNumber(signNum + "/" + loadNum);
nodeInfoVO.setOperateWarehouseName(qualityDeliverEntity.getWarehouseName());
nodeInfoVO.setOperateTime(qualityDeliverEntity.getCreateTime());
// 增加网点电话
BasicdataWarehouseEntity entityWarehouseId = basicdataWarehouseClient.getEntityWarehouseId(qualityDeliverEntity.getWarehouseId());
if (entityWarehouseId != null) {
nodeInfoVO.setOperateWarehousePhone(entityWarehouseId.getContactNumber());
if (signNum != 0) {
QualityDeliverEntity qualityDeliverEntity = signListByWaybillNumber.stream().filter(e -> e.getSignTime() != null).findFirst().orElse(null);
if(qualityDeliverEntity != null){
nodeInfoVO = new NodeInfoVO();
nodeInfoVO.setOperateName("配送签收");
nodeInfoVO.setOperateNumber(signNum + "/" + loadNum);
nodeInfoVO.setOperateWarehouseName(qualityDeliverEntity.getWarehouseName());
nodeInfoVO.setOperateTime(qualityDeliverEntity.getSignTime());
// 增加网点电话
BasicdataWarehouseEntity entityWarehouseId = basicdataWarehouseClient.getEntityWarehouseId(qualityDeliverEntity.getWarehouseId());
if (entityWarehouseId != null) {
nodeInfoVO.setOperateWarehousePhone(entityWarehouseId.getContactNumber());
}
nodeInfoVOList.add(nodeInfoVO);
}
nodeInfoVOList.add(nodeInfoVO);
}
}
//对nodeInfoVOList集合中的作业时间 按照 时间倒序排序
nodeInfoVOList.sort(Comparator.comparing(NodeInfoVO::getOperateTime).reversed());
result.setNodeInfoVOList(nodeInfoVOList);
// 配送签收
return result;
}
private NodeInfoVO buildTrunklineByUnLoadCar(List<TrunklineCarsLoadScanEntity> trunklineCarsLoadScanEntities, String key) {
private NodeInfoVO buildTrunklineByUnLoadCar(List<TrunklineCarsLoadScanEntity> trunklineCarsLoadScanEntities, List<TrunklineCarsLoadLineEntity> listByLoadId ) {
// 获取卸车集合
List<TrunklineCarsLoadScanEntity> collect = trunklineCarsLoadScanEntities.stream().filter(t -> t.getScanStatus().equals("2")).collect(Collectors.toList());
@ -376,17 +412,29 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService {
if (collect.isEmpty()) {
return null;
}
if(listByLoadId.isEmpty()){
return null;
}
// 判断该卸车作业节点
TrunklineCarsLoadScanEntity trunklineCarsLoadScanEntity = collect.get(0);
TrunklineCarsLoadLineEntity trunklineCarsLoadLineEntity = listByLoadId.stream().filter(t -> t.getNodeName().equals(trunklineCarsLoadScanEntity.getUnloadNodeName())).findFirst().orElse(null);
if(trunklineCarsLoadLineEntity == null){
return null;
}
NodeInfoVO nodeInfoVO = new NodeInfoVO();
nodeInfoVO.setOperateName("干线到达");
nodeInfoVO.setOperateNumber(collect.size() + "");
nodeInfoVO.setOperateWarehouseName(trunklineCarsLoadScanEntity.getUnloadNodeName());
nodeInfoVO.setOperateTime(trunklineCarsLoadScanEntity.getCreateTime());
nodeInfoVO.setOperateTime(trunklineCarsLoadLineEntity.getArriveDate());
return nodeInfoVO;
}
private NodeInfoVO buildTrunklineByLoadCar(List<TrunklineCarsLoadScanEntity> trunklineCarsLoadScanEntities, String key) {
private NodeInfoVO buildTrunklineByLoadCar(List<TrunklineCarsLoadScanEntity> trunklineCarsLoadScanEntities, List<TrunklineCarsLoadLineEntity> listByLoadId ) {
// 判断trunklineCarsLoadScanEntities 中 warehouseId 不是null的集合
log.info(">>> trunklineCarsLoadScanEntities ={}",trunklineCarsLoadScanEntities);
@ -396,11 +444,18 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService {
return null;
}
TrunklineCarsLoadScanEntity trunklineCarsLoadScanEntity = collect.get(0);
TrunklineCarsLoadLineEntity trunklineCarsLoadLineEntity = listByLoadId.stream().filter(t -> t.getNodeName().equals(trunklineCarsLoadScanEntity.getWarehouseName())).findFirst().orElse(null);
if(trunklineCarsLoadLineEntity == null){
return null;
}
NodeInfoVO nodeInfoVO = new NodeInfoVO();
nodeInfoVO.setOperateName("干线发车");
nodeInfoVO.setOperateNumber(collect.size() + "");
nodeInfoVO.setOperateWarehouseName(trunklineCarsLoadScanEntity.getWarehouseName());
nodeInfoVO.setOperateTime(trunklineCarsLoadScanEntity.getUnloadTime());
nodeInfoVO.setOperateTime(trunklineCarsLoadLineEntity.getStartDate());
return nodeInfoVO;
}

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

@ -495,4 +495,6 @@ public interface DistributionSignforMapper extends BaseMapper<DistributionSignfo
* @return
*/
Integer loadingNum(@Param("reservationId")Long reservationId);
void updateSignfor(@Param("deliveryId") Long deliveryId, @Param("reservationId") Long reservationId, @Param("nub") Integer packageNub, @Param("user") BladeUser user);
}

11
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml

@ -133,6 +133,17 @@
)
WHERE
lds.reservation_id = #{reservationId}
</update>
<update id="updateSignfor">
UPDATE logpm_distribution_signfor SET
signee_name = #{user.nickName},
signee_id = #{user.userId},
received_quantity = ( received_quantity + #{nub} )
WHERE
is_deleted =0 and delivery_id = #{deliveryId} and reservation_id = #{reservationId}
</update>
<delete id="deleteByReservationAndDeliveryId">
DELETE FROM logpm_distribution_signfor

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

@ -10641,7 +10641,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
* 保存对配送清单实体所做的所有更新确保数据的一致性和准确性
* @param deliveryListEntity 配送清单实体包含所有需要更新的信息
*/
updateDeliveryListEntity(deliveryListEntity, old);
// updateDeliveryListEntity(deliveryListEntity, old);
}
private int getDeliveryQuantity(DistributionDeliveryListEntity deliveryListEntity) {
@ -10677,6 +10677,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (deliveryListEntity.getDeliveryStatus().equals(DeliveryStatusConstant.yiwancheng.getValue())) {
handleDeliveryLog(deliveryListEntity, AuthUtil.getUser());
}
DistributionDeliveryListEntity update = new DistributionDeliveryListEntity();
update.setId(deliveryListEntity.getId());
update.setDeliveryListLoadingStatus(deliveryListEntity.getDeliveryListLoadingStatus());
update.setDeliveryStatus(deliveryListEntity.getDeliveryStatus());
this.updateById(update);
}
@ -10751,8 +10758,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
updateById(deliveryListEntity);
log.info("配送信息状态已更新,deliveryId: {}", deliveryListEntity.getId());
Boolean b1=DeliveryStatusConstant.yiwancheng.getValue().equals(deliveryListEntity.getDeliveryStatus());
Boolean b2 =deliveryListEntity.getScannedNumber().equals(0);
// Boolean b1=DeliveryStatusConstant.yiwancheng.getValue().equals(deliveryListEntity.getDeliveryStatus());
// Boolean b2 =deliveryListEntity.getScannedNumber().equals(0);
// 推送给配送被取消的的作业节点
// if (b1&& b2) {
// // 发送配送取消的消息完成消息

22
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

@ -3876,6 +3876,8 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
throw new RuntimeException("服务器正忙!!!");
}
DistributionReservationEntity reservationEntity = this.getById(reservationId);
DistributionReservationEntity updateEntity = new DistributionReservationEntity();
updateEntity.setId(reservationEntity.getId());
//已签收预约单不需要进行预约状态维护 预约单状态达到最终
if (!ReservationSigningStatusConstant.yiqianshou.getValue().equals(reservationEntity.getSigningStatus())) {
List<DistributionParcelListEntity> distributionParcelListEntities = distributionReservationMapper.selectPackageListByReservationId(reservationId);
@ -3894,16 +3896,16 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
}
if (loadStatus) {
reservationEntity.setLoadingStatus(ReservationLoadingStatusConstant.yizhuangche.getValue());
updateEntity.setLoadingStatus(ReservationLoadingStatusConstant.yizhuangche.getValue());
} else {
//判断是否都为完成装车
Integer loadingNum = distributionLoadscanMapper.selectLoadingNumByReservationId(reservationId);
if (Func.isEmpty(loadingNum)) {
if (loadingNum > 0) {
reservationEntity.setLoadingStatus(ReservationLoadingStatusConstant.bufenzhuangche.getValue());
updateEntity.setLoadingStatus(ReservationLoadingStatusConstant.bufenzhuangche.getValue());
}
if (loadingNum == 0) {
reservationEntity.setLoadingStatus(ReservationLoadingStatusConstant.daizhuangche.getValue());
updateEntity.setLoadingStatus(ReservationLoadingStatusConstant.daizhuangche.getValue());
}
}
}
@ -3912,28 +3914,28 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
Integer signingNum = distributionLoadscanMapper.selectSigningNumByReservationId(reservationId);
//判断当前客户是否签收完成了
if (signingNum > 0) {
reservationEntity.setSigningStatus(ReservationSigningStatusConstant.bufenqianshou.getValue());
updateEntity.setSigningStatus(ReservationSigningStatusConstant.bufenqianshou.getValue());
}
if (signingNum == 0) {
reservationEntity.setSigningStatus(ReservationSigningStatusConstant.daiqianshou.getValue());
updateEntity.setSigningStatus(ReservationSigningStatusConstant.daiqianshou.getValue());
}
if (stockUpStatus) {
reservationEntity.setStockStatus(ReservationStockupStatusConstant.yibeihuo.getValue());
updateEntity.setStockStatus(ReservationStockupStatusConstant.yibeihuo.getValue());
} else {
//判断是否都为完成签收
Integer stockNum = distributionStockMapper.selectStockNumByReservationId(reservationId);
//判断当前客户是否签收完成了
if (stockNum > 0) {
reservationEntity.setStockStatus(ReservationStockupStatusConstant.daibeihuo.getValue());
updateEntity.setStockStatus(ReservationStockupStatusConstant.daibeihuo.getValue());
} else {
reservationEntity.setStockStatus(ReservationStockupStatusConstant.weibeihuo.getValue());
updateEntity.setStockStatus(ReservationStockupStatusConstant.weibeihuo.getValue());
}
}
if ((reservationEntity.getReservationNum() + reservationEntity.getReservationStockListNum()) == 0) {
reservationEntity.setReservationStatus(ReservationStatusConstant.yiquexiao.getValue());
updateEntity.setReservationStatus(ReservationStatusConstant.yiquexiao.getValue());
}
this.updateById(reservationEntity);
this.updateById(updateEntity);
}
}

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

@ -4377,10 +4377,12 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
packageLockIds.add(loadscaninvnEntity.getInventoryPackageId());
distributionLoadscaninvnService.updateById(loadscaninvnEntity);
pushList.add(loadscaninvnEntity);
//维护签收数量
Integer j = distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub());
//更新签收人
Integer i = distributionSignforMapper.updateSignUser(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), user);
// //维护签收数量
// Integer j = distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub());
// //更新签收人
// Integer i = distributionSignforMapper.updateSignUser(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), user);
updataSignforeExtracted(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub(), user);
} else {
//库存品未进行装车
//这里装车的数据需要进行补录
@ -5200,9 +5202,12 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadscaninvnService.updateById(loadscaninvnEntity);
distributionLoadscaninvnEntityLists.add(loadscaninvnEntity);
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distributionDeliveryListEntity.getId());
Integer j = distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub());
//更新签收人
Integer m = distributionSignforMapper.updateSignUser(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), AuthUtil.getUser());
// Integer j = distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub());
// //更新签收人
// Integer m = distributionSignforMapper.updateSignUser(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), AuthUtil.getUser());
//
updataSignforeExtracted(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub(), user);
distributionAsyncService.checkSignStatus(null, loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getDeliveryId());
}
} else {
@ -5732,9 +5737,10 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
loadscaninvnEntity.setReceivedQuantity(detailEntity.getNum());
loadscaninvnEntity.setSigningTime(simpleDateFormat.format(new Date()));
distributionLoadscaninvnService.updateById(loadscaninvnEntity);
Integer j = distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub());
//更新签收人
Integer m = distributionSignforMapper.updateSignUser(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), AuthUtil.getUser());
// Integer j = distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub());
// //更新签收人
// Integer m = distributionSignforMapper.updateSignUser(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), AuthUtil.getUser());
updataSignforeExtracted(loadscaninvnEntity.getDeliveryId(),loadscaninvnEntity.getReservationId(),loadscaninvnEntity.getPackageNub(),user);
packageLockIds.add(loadscaninvnEntity.getInventoryPackageId());
distributionLoadscaninvnEntityLists.add(loadscaninvnEntity);
}
@ -8043,10 +8049,13 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
Integer type = distrilbutionloadingscanDTO.getType();
String barcode = "";
DistributionDeliveryListEntity deliveryListEntity = distributionDeliveryListService.getById(deliveryId);
if (Objects.isNull(deliveryListEntity)) {
log.error(method + "查询配送信息错误,deliveryId:{}", deliveryId);
return Resp.scanFail("查询配送信息错误,请联系管理员", "查询配送信息错误,请联系管理员");
}
DistributionDeliveryListEntity updateDeliveryListEntity =new DistributionDeliveryListEntity();
updateDeliveryListEntity.setId(deliveryListEntity.getId());
if (DeliveryStatusConstant.yiwancheng.getValue().equals(deliveryListEntity.getDeliveryStatus())) {
log.error(method + "当前配送已完成,deliveryId:{}", deliveryId);
return Resp.scanFail("当前配送已完成", "当前配送已完成");
@ -8143,10 +8152,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadscanEntity = updateSignDistributionLoadscanEntity(loadscanEntity, user, parcelListEntity);
distributionLoadscanService.updateById(distributionLoadscanEntity);
//缺少一个异步维护包件签收的方法
distributionSignforMapper.updateSignforNum(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
//更新签收人
distributionSignforMapper.updateSignUser(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), user);
updataSignforeExtracted(distributionLoadscanEntity.getDeliveryId(),distributionLoadscanEntity.getReservationId(),distributionLoadscanEntity.getPackageNub(), user);
//维护订单状态
String content = "包件在" + myCurrentWarehouse.getName() + "由" + distributionLoadscanEntity.getSigningUser() + "扫描签收,装车方式:扫描装车,配送车次号:" + deliveryListEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode();
JSONObject trunklinePackageTrackLog = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode(), deliveryListEntity.getId().toString(), parcelListEntity.getWarehouseEntryTimeEnd());
@ -8164,10 +8172,13 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadscanService.save(distributionLoadscanEntity);
//进行签收数量的修改
distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId());
//更新装车包件数和签收包件数
distributionSignforMapper.updateSignforByReservationId(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
//更新签收人
distributionSignforMapper.updateSignUser(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), AuthUtil.getUser());
// //更新装车包件数和签收包件数
// distributionSignforMapper.updateSignforByReservationId(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
// //更新签收人
// distributionSignforMapper.updateSignUser(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), AuthUtil.getUser());
updataSignforeExtracted(distributionLoadscanEntity.getDeliveryId(),distributionLoadscanEntity.getReservationId(),distributionLoadscanEntity.getPackageNub(), user);
String content = "包件在" + myCurrentWarehouse.getName() + "由" + distributionLoadscanEntity.getSigningUser() + "扫描签收,装车方式:补录装车,配送车次号:" + deliveryListEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode();
JSONObject trunklinePackageTrackLog = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode(), deliveryListEntity.getId().toString(), parcelListEntity.getWarehouseEntryTimeEnd());
aaa.add(trunklinePackageTrackLog);
@ -8182,9 +8193,12 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
warehouseUpdownTypeClient.downPackageOrDelTray(orderPackageCodes, warehouseId, remark);
pushList.add(distributionLoadscanEntity);
packageLockIds.add(parcelListEntity.getId());
parcelListEntity.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.yizhuangche.getValue());
parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue());
distributionParcelListService.updateById(parcelListEntity);
DistributionParcelListEntity updateE= new DistributionParcelListEntity();
updateE.setId(parcelListEntity.getId());
updateE.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.yizhuangche.getValue());
updateE.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue());
distributionParcelListService.updateById(updateE);
//维护签收包件状态
orderCodes.add(parcelListEntity.getOrderCode());
} else {
@ -8347,8 +8361,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
loadscanEntity.setPackageNub(parcelNumberDTO.getSigningNum());
loadscanEntity.setLoadedNub(parcelNumberDTO.getSigningNum());
loadscanEntity.setSigningUserId(user.getUserId());
assert distributionDeliverySelfEntity != null;
if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverId())) {
if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverId())) {
loadscanEntity.setDriverId(distributionDeliverySelfEntity.getDriverId());
}
if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverName())) {
@ -8459,10 +8472,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
packageLockIds.add(loadscaninvnEntity.getInventoryPackageId());
distributionLoadscaninvnService.updateById(loadscaninvnEntity);
pushInventoryList.add(loadscaninvnEntity);
//维护签收数量
distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub());
//更新签收人
distributionSignforMapper.updateSignUser(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), user);
// distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub());
// distributionSignforMapper.updateSignUser(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), user);
updataSignforeExtracted(loadscaninvnEntity.getDeliveryId(),loadscaninvnEntity.getReservationId(),loadscaninvnEntity.getPackageNub(),user);
} else {
//存在配置要求必须装车才能进行签收
if (Integer.parseInt(IsOrNoConstant.yes.getValue()) == isStrictLoading) {
@ -8577,6 +8591,23 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
return Resp.scanSuccess(integer + "件", integer + "件");
}
/**
* 签收维护签收单数量 签收数量 签收人
* @param deliveryId 配送ID
* @param reservationId 预约单ID
* @param number 数量
* @param user 用户
*/
private void updataSignforeExtracted(Long deliveryId,Long reservationId,Integer number, BladeUser user) {
//缺少一个异步维护包件签收的方法
// distributionSignforMapper.updateSignforNum(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
// //更新签收人
// distributionSignforMapper.updateSignUser(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), user);
distributionSignforMapper.updateSignfor(deliveryId,reservationId,number,user);
}
@Override
public R selectDistributionNewAppDeliveryListPage(DistributionAppDeliveryListDTO distributionDeliveryList) {
String method = "######################################DistributionSignforServiceImpl.selectDistributionNewAppDeliveryListPage";
@ -9384,6 +9415,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadscanEntity.setVehicleName(loadscanEntity.getVehicleName());
distributionLoadscanEntity.setSigningUserId(user.getUserId());
distributionLoadscanEntity.setDriverId(loadscanEntity.getDriverId());
distributionLoadscanEntity.setReservationId(loadscanEntity.getReservationId());
distributionLoadscanEntity.setDeliveryId(loadscanEntity.getDeliveryId());
distributionLoadscanEntity.setPackageNub(loadscanEntity.getPackageNub());
distributionLoadscanEntity.setDriverName(loadscanEntity.getDriverName());
distributionLoadscanEntity.setSignforType(LoadScanSigningTypeStatusConstant.sijiqianshou.getValue());
distributionLoadscanEntity.setSignforState(LoadScanSigningStatusConstant.weiqianshou.getValue());

54
blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/job/AuthPushJob.java

@ -2,9 +2,15 @@ package com.logpm.factorydata.jinpai.job;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.factorydata.jinpai.entity.CustomPushEntity;
import com.logpm.factorydata.jinpai.entity.FactoryNodePushEntity;
import com.logpm.factorydata.jinpai.pros.JinPaiProperties;
import com.logpm.factorydata.jinpai.service.CustomPushService;
import com.logpm.factorydata.jinpai.service.FactoryNodePushService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.AllArgsConstructor;
@ -29,6 +35,8 @@ public class AuthPushJob {
private final CustomPushService customPushService;
private final RabbitTemplate rabbitTemplate;
private final FactoryNodePushService factoryNodePushService;
private final JinPaiProperties jinPaiProperties;
/**
* 自定义回传工厂节点作业数据
@ -59,4 +67,50 @@ public class AuthPushJob {
return ReturnT.SUCCESS;
}
/**
* 字段缺失重新推送
*
* @param param
* @return
* @throws Exception
*/
@XxlJob("rePush")
public ReturnT<String> rePush(String param) throws Exception {
// 查出数据,回推工厂
List<FactoryNodePushEntity> list = factoryNodePushService.list(Wrappers.<FactoryNodePushEntity>lambdaQuery()
.eq(FactoryNodePushEntity::getReserve1, "0").last(" limit 1"));
if (CollUtil.isNotEmpty(list)) {
FactoryNodePushEntity factoryNodePushEntity = list.get(0);
String content = factoryNodePushEntity.getContent();
JSONObject entries = JSONUtil.parseObj(content);
entries.set("passSite", entries.getStr("endSite"));
entries.set("sendSite", entries.getStr("endSite"));
String url = jinPaiProperties.getOldSystemHost() + jinPaiProperties.getOldSystemArrivedUrl();
log.info("字段缺失重新推送:{}", JSONUtil.toJsonStr(entries));
String result = HttpUtil.post(url, JSONUtil.toJsonStr(entries));
FactoryNodePushEntity factoryNodePushEntity1 = new FactoryNodePushEntity();
factoryNodePushEntity1.setContent(JSONUtil.toJsonStr(entries));
factoryNodePushEntity1.setId(factoryNodePushEntity.getId());
factoryNodePushEntity1.setReserve1("1");
factoryNodePushEntity1.setResultContent(result);
factoryNodePushService.updateById(factoryNodePushEntity1);
List<FactoryNodePushEntity> list1 = factoryNodePushService.list(Wrappers.<FactoryNodePushEntity>lambdaQuery()
.eq(FactoryNodePushEntity::getTransportNo, factoryNodePushEntity.getTransportNo())
.eq(FactoryNodePushEntity::getOrderCode, factoryNodePushEntity.getOrderCode()));
if(CollUtil.isNotEmpty(list1)){
for (FactoryNodePushEntity nodePushEntity : list1) {
String content1 = nodePushEntity.getContent();
String url1 = jinPaiProperties.getOldSystemHost() + jinPaiProperties.getOldSystemAlreadyStockedUrl();
log.info("字段缺失重新推送:{}", JSONUtil.toJsonStr(entries));
String result1 = HttpUtil.post(url1, content1);
FactoryNodePushEntity factoryNodePushEntity2 = new FactoryNodePushEntity();
factoryNodePushEntity2.setResultContent(result1);
factoryNodePushEntity2.setId(nodePushEntity.getId());
factoryNodePushService.updateById(factoryNodePushEntity2);
}
}
}
return ReturnT.SUCCESS;
}
}

18
blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/mq/NodeDataPushListener.java

@ -250,9 +250,17 @@ public class NodeDataPushListener {
js.set("doType", 32);
js.set("doLocation", "");
js.set("doTime", entries.getStr("operatorTime"));
js.set("sendSite", filterDatum.getWaybillStartWarehouse());
if (StrUtil.isNotEmpty(filterDatum.getWaybillStartWarehouse())) {
js.set("sendSite", filterDatum.getWaybillStartWarehouse());
} else {
js.set("sendSite", filterDatum.getWarehouseName());
}
js.set("endSite", filterDatum.getWarehouseName());
js.set("passSite", filterDatum.getDestinationWarehouse());
if (StrUtil.isNotEmpty(filterDatum.getDestinationWarehouse())) {
js.set("passSite", filterDatum.getDestinationWarehouse());
} else {
js.set("passSite", filterDatum.getWarehouseName());
}
js.set("doRemark", "");
js.set("reqSn", (RandomUtil.randomLong(100000000000000000L, 999999999999999999L)) + "");
js.set("syscode", "huitong");
@ -297,9 +305,9 @@ public class NodeDataPushListener {
.content(objects)
.build();
factoryDataClient.sendMessage(SendMsg.builder()
.exchange(FactoryDataConstants.Mq.Exchanges.NODE_DATA_PUSH_DELAYED)
.routingKey(FactoryDataConstants.Mq.RoutingKeys.JP_NODE_DATA_PUSH)
.message(JSONUtil.toJsonStr(nodePushMsg, HutoolConfigUtil.jsonConfigByDataTimeFormat()))
.exchange(FactoryDataConstants.Mq.Exchanges.NODE_DATA_PUSH_DELAYED)
.routingKey(FactoryDataConstants.Mq.RoutingKeys.JP_NODE_DATA_PUSH)
.message(JSONUtil.toJsonStr(nodePushMsg, HutoolConfigUtil.jsonConfigByDataTimeFormat()))
// 30-109秒随机
.delay(1000 * RandomUtil.randomInt(30, 110))
.build());

124
blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/entity/FactoryNodePushEntity.java

@ -0,0 +1,124 @@
package com.logpm.factorydata.suofeiya.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springblade.core.mp.base.BaseEntity;
/**
* 索菲亚工厂节点数据推送记录表
*
* @Author zqb
* @Date 2024/3/26
**/
@Builder
@Data
@TableName("sfy_factory_node_push")
@ApiModel(value = "索菲亚工厂节点数据推送记录表", description = "索菲亚工厂节点数据推送记录表")
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class FactoryNodePushEntity extends BaseEntity {
/**
* 预留1
*/
@ApiModelProperty(value = "预留1")
private String reserve1;
/**
* 预留2
*/
@ApiModelProperty(value = "预留2")
private String reserve2;
/**
* 预留3
*/
@ApiModelProperty(value = "预留3")
private String reserve3;
/**
* 预留4
*/
@ApiModelProperty(value = "预留4")
private String reserve4;
/**
* 预留5
*/
@ApiModelProperty(value = "预留5")
private String reserve5;
/**
* 订单类型
*/
@ApiModelProperty(value = "订单类型")
private String orderType;
/**
* 操作节点
*/
@ApiModelProperty(value = "操作节点")
private String logisticsStatus;
/**
* 包条码
*/
@ApiModelProperty(value = "包条码")
private String packageCode;
/**
* 发货单号
*/
@ApiModelProperty(value = "发货单号")
private String shipPlanNo;
/**
* 公司
*/
@ApiModelProperty(value = "公司")
private String companyCode;
/**
* 时间戳
*/
@ApiModelProperty(value = "时间戳")
private Long timestamp;
/**
* 加密字符
*/
@ApiModelProperty(value = "加密字符")
private String digest;
/**
* 发送状态
*/
@ApiModelProperty(value = "发送状态(0:成功,-1:失败,1:取消)")
private String sendStatus;
/**
* 加密秘钥
*/
@ApiModelProperty(value = "加密秘钥")
private String appKey;
/**
* url
*/
@ApiModelProperty(value = "url")
private String sendUrl;
/**
* 内容
*/
@ApiModelProperty(value = "内容")
private String content;
/**
* 返回值
*/
@ApiModelProperty(value = "返回值")
private String resultContent;
/**
* 租户
*/
@ApiModelProperty(value = "租户")
private String tenantCode;
/**
* 作业仓库
*/
@ApiModelProperty(value = "作业仓库")
private String warehouse;
}

16
blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/mapper/FactoryNodePushMapper.java

@ -0,0 +1,16 @@
package com.logpm.factorydata.suofeiya.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.logpm.factorydata.suofeiya.entity.FactoryNodePushEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 索菲亚工厂节点数据推送记录表 mapper
*
* @author zqb
* @since 2024-03-26
*/
@Mapper
public interface FactoryNodePushMapper extends BaseMapper<FactoryNodePushEntity> {
}

5
blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/mapper/FactoryNodePushMapper.xml

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.logpm.factorydata.suofeiya.mapper.FactoryNodePushMapper">
</mapper>

14
blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/service/FactoryNodePushService.java

@ -0,0 +1,14 @@
package com.logpm.factorydata.suofeiya.service;
import com.logpm.factorydata.suofeiya.entity.FactoryNodePushEntity;
import org.springblade.core.mp.base.BaseService;
/**
* 索菲亚工厂节点数据推送记录表 服务类
*
* @Author zqb
* @Date 2024/4/26
**/
public interface FactoryNodePushService extends BaseService<FactoryNodePushEntity> {
}

50
blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/service/impl/FactoryDataServiceImpl.java

@ -18,6 +18,7 @@ import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.factorydata.enums.SaxStatusEnums;
import com.logpm.factorydata.suofeiya.entity.DeliveryNoteEntity;
import com.logpm.factorydata.suofeiya.entity.FactoryNodePushEntity;
import com.logpm.factorydata.suofeiya.entity.FactoryOrderLogEntity;
import com.logpm.factorydata.suofeiya.entity.OrderInfoEntity;
import com.logpm.factorydata.suofeiya.entity.PackageInfoEntity;
@ -28,6 +29,7 @@ import com.logpm.factorydata.suofeiya.pros.FactoryDataSuoFeiYaProperties;
import com.logpm.factorydata.suofeiya.pros.OldProperties;
import com.logpm.factorydata.suofeiya.service.DeliveryNoteService;
import com.logpm.factorydata.suofeiya.service.FactoryDataService;
import com.logpm.factorydata.suofeiya.service.FactoryNodePushService;
import com.logpm.factorydata.suofeiya.service.FactoryOrderLogService;
import com.logpm.factorydata.suofeiya.service.OrderInfoService;
import com.logpm.factorydata.suofeiya.service.PackageInfoService;
@ -68,6 +70,7 @@ public class FactoryDataServiceImpl implements FactoryDataService {
private final FactoryOrderLogService logService;
private final OldProperties oldProperties;
private final FactoryDataSuoFeiYaProperties dataSuoFeiYaProperties;
private final FactoryNodePushService factoryNodePushService;
@Override
@Transactional(rollbackFor = Exception.class)
@ -198,6 +201,7 @@ public class FactoryDataServiceImpl implements FactoryDataService {
// 按订单号和运单号进行分组
if (CollUtil.isNotEmpty(content)) {
for (Map.Entry<String, Set<String>> entry : packageCodeMap.entrySet()) {
FactoryNodePushEntity nodePushEntity = new FactoryNodePushEntity();
String key = entry.getKey();
Set<String> value = entry.getValue();
JSONObject jsons = new JSONObject();
@ -221,11 +225,23 @@ public class FactoryDataServiceImpl implements FactoryDataService {
packages.add(js);
}
}
if (CollUtil.isNotEmpty(packages)) {
String paNo = packages.stream().map(i -> i.getStr("paNo")).collect(Collectors.joining(","));
nodePushEntity.setPackageCode(paNo);
}
jsons.set("packageInfo", new JSONArray(packages));
if(StrUtil.equals(key, "Z")){
if (StrUtil.equals(key, "Z")) {
jsons.set("orderType", key);
nodePushEntity.setOrderType(key);
}
nodePushEntity.setLogisticsStatus(factoryNode.getText());
String jsonStr = JSONUtil.toJsonStr(jsons);
nodePushEntity.setContent(jsonStr);
nodePushEntity.setTenantCode(AuthUtil.getTenantId());
nodePushEntity.setAppKey(appKey);
nodePushEntity.setCompanyCode(companyCode);
nodePushEntity.setTimestamp(time);
nodePushEntity.setWarehouse(entries.getStr("warehouse"));
if (oldProperties.getEnable()) {
try {
log.info("推送节点数据:{}", jsonStr);
@ -238,7 +254,7 @@ public class FactoryDataServiceImpl implements FactoryDataService {
}
if (dataSuoFeiYaProperties.getPush().getPushEnable()) {
String paStatusUrl = dataSuoFeiYaProperties.getPush().getPaStatusUrl();
sendFactory(companyCode, jsonStr, time, appKey, paStatusUrl);
sendFactory(companyCode, jsonStr, time, appKey, paStatusUrl, nodePushEntity);
}
}
}
@ -246,6 +262,7 @@ public class FactoryDataServiceImpl implements FactoryDataService {
// 推送配送单计划
if (CollUtil.isNotEmpty(content)) {
for (Map.Entry<String, Set<String>> entry : packageCodeMap.entrySet()) {
FactoryNodePushEntity nodePushEntity = new FactoryNodePushEntity();
String key = entry.getKey();
Set<String> value = entry.getValue();
JSONObject jsons = new JSONObject();
@ -262,9 +279,14 @@ public class FactoryDataServiceImpl implements FactoryDataService {
packages.add(pushData.getPackageCode());
}
}
if (CollUtil.isNotEmpty(packages)) {
String paNo = packages.stream().collect(Collectors.joining(","));
nodePushEntity.setPackageCode(paNo);
}
if (StrUtil.isNotEmpty(main)) {
JSONObject jsonObject = JSONUtil.parseObj(main);
jsons.set("shipPlanNo", jsonObject.getStr("trainNumber"));
nodePushEntity.setShipPlanNo(jsonObject.getStr("trainNumber"));
jsons.set("receiver", jsonObject.getStr("receiver"));
jsons.set("receiveAddr", jsonObject.getStr("receiveAddr"));
jsons.set("receiveTel", jsonObject.getStr("receiveTel"));
@ -273,10 +295,18 @@ public class FactoryDataServiceImpl implements FactoryDataService {
jsons.set("paNo", JSONUtil.toJsonStr(packages));
jsons.set("remark", "");
jsons.set("orderExtendFields", new JSONArray());
if(StrUtil.equals(key, "Z")){
if (StrUtil.equals(key, "Z")) {
jsons.set("orderType", key);
nodePushEntity.setOrderType(key);
}
nodePushEntity.setLogisticsStatus(factoryNode.getText());
String jsonStr = JSONUtil.toJsonStr(jsons);
nodePushEntity.setContent(jsonStr);
nodePushEntity.setTenantCode(AuthUtil.getTenantId());
nodePushEntity.setAppKey(appKey);
nodePushEntity.setCompanyCode(companyCode);
nodePushEntity.setTimestamp(time);
nodePushEntity.setWarehouse(entries.getStr("warehouse"));
if (oldProperties.getEnable()) {
try {
log.info("推送节点数据:{}", jsonStr);
@ -289,14 +319,14 @@ public class FactoryDataServiceImpl implements FactoryDataService {
}
if (dataSuoFeiYaProperties.getPush().getPushEnable()) {
String paStatusUrl = dataSuoFeiYaProperties.getPush().getShipPlanUrl();
sendFactory(companyCode, jsonStr, time, appKey, paStatusUrl);
sendFactory(companyCode, jsonStr, time, appKey, paStatusUrl, nodePushEntity);
}
}
}
}
}
private void sendFactory(String companyCode, String jsonStr, Long time, String appKey, String paStatusUrl) {
private void sendFactory(String companyCode, String jsonStr, Long time, String appKey, String paStatusUrl, FactoryNodePushEntity nodePushEntity) {
try {
Map<String, Object> param = new HashMap<>();
param.put("companyCode", companyCode);
@ -306,8 +336,18 @@ public class FactoryDataServiceImpl implements FactoryDataService {
String digest = MD5.create().digestHex(jsonStr + appKey + time);
String encode = Base64.encode(digest);
param.put("digest", encode);
nodePushEntity.setDigest(digest);
nodePushEntity.setSendUrl(dataSuoFeiYaProperties.getPush().getPushHost() + paStatusUrl);
log.info("推送节点数据:{}", JSONUtil.toJsonStr(param));
String post = HttpUtil.post(dataSuoFeiYaProperties.getPush().getPushHost() + paStatusUrl, param);
nodePushEntity.setResultContent(post);
JSONObject entries = JSONUtil.parseObj(post);
if (StrUtil.equals(entries.getStr("result_code"), "0000")) {
nodePushEntity.setSendStatus("0");
} else {
nodePushEntity.setSendStatus("-1");
}
factoryNodePushService.save(nodePushEntity);
log.info("推送结果:{}", post);
} catch (Exception e) {
e.printStackTrace();

22
blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/service/impl/FactoryNodePushServiceImpl.java

@ -0,0 +1,22 @@
package com.logpm.factorydata.suofeiya.service.impl;
import com.logpm.factorydata.suofeiya.entity.FactoryNodePushEntity;
import com.logpm.factorydata.suofeiya.mapper.FactoryNodePushMapper;
import com.logpm.factorydata.suofeiya.service.FactoryNodePushService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
/**
* 索菲亚工厂节点数据推送记录表 业务实现类
*
* @Author zqb
* @Date 2024/4/26
**/
@Slf4j
@Service
@AllArgsConstructor
public class FactoryNodePushServiceImpl extends BaseServiceImpl<FactoryNodePushMapper, FactoryNodePushEntity> implements FactoryNodePushService {
}

2
blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportPackgeStartTimeVO.java

@ -28,7 +28,7 @@ public class ReportPackgeStartTimeVO implements Serializable {
@ExcelProperty(value = "未发运件数")
private Integer noOutNum;
@ExcelProperty(value = "发运超时件数")
@ExcelProperty(value = "发运超时件数")
private Integer noOutOverNum;
@ExcelProperty(value = "准时发运件数")

20
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/feign/TrunklineCarsLoadLineClient.java

@ -0,0 +1,20 @@
package com.logpm.trunkline.feign;
import com.logpm.trunkline.entity.TrunklineCarsLoadLineEntity;
import com.logpm.trunkline.service.ITrunklineCarsLoadLineService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@Slf4j
@RestController
@AllArgsConstructor
public class TrunklineCarsLoadLineClient implements ITrunklineCarsLoadLineClient {
private final ITrunklineCarsLoadLineService trunklineCarsLoadLineService;
@Override
public List<TrunklineCarsLoadLineEntity> findListByLoadId(Long loadId) {
return trunklineCarsLoadLineService.findListByLoadId(loadId);
}
}

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/AdvanceOrderMqServiceImpl.java

@ -108,6 +108,8 @@ public class AdvanceOrderMqServiceImpl implements IAdvanceOrderMqService {
advanceEntity.setCreateUserName(AuthUtil.getNickName());
advanceService.save(advanceEntity);
} else {
advanceEntity.setWaybillStatus(null);
advanceEntity.setWaybillNo(null);
advanceService.updateById(advanceEntity);
}
}

26
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

@ -636,7 +636,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
//如果发货单位没有id值,则把发货单位信息自动添加到client中
BasicdataClientEntity clientEntity = basicdataClientClient.findByName(shipper);
if(Objects.isNull(clientEntity)){
shipperId = saveNewClient(openOrderDTO.getShipper(), openOrderDTO.getShipperName(), openOrderDTO.getShipperMobile(), openOrderDTO.getShipperAddress(), "6");
shipperId = saveNewClient(openOrderDTO.getShipper(), openOrderDTO.getShipperName(), openOrderDTO.getShipperMobile(), openOrderDTO.getShipperAddress(), "7");
}else{
shipperId = clientEntity.getId();
}
@ -654,7 +654,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
//如果收货单位没有id值,则把收货单位信息自动添加到client中
BasicdataClientEntity clientEntity = basicdataClientClient.findByName(consignee);
if(Objects.isNull(clientEntity)){
consigneeId = saveNewClient(openOrderDTO.getConsignee(), openOrderDTO.getConsigneeName(), openOrderDTO.getConsigneeMobile(), openOrderDTO.getConsigneeAddress(), "2");
consigneeId = saveNewClient(openOrderDTO.getConsignee(), openOrderDTO.getConsigneeName(), openOrderDTO.getConsigneeMobile(), openOrderDTO.getConsigneeAddress(), "7");
}else{
consigneeId = clientEntity.getId();
}
@ -802,6 +802,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
//绑定订单和运单的关系
List<TrunklineAdvanceEntity> advanceEntityList = advanceService.findListByIds(advanceIds);
List<TrunklineWaybillOrderEntity> waybillOrderEntities = new ArrayList<>();
List<TrunklineAdvanceEntity> updateAdvanceEntityList = new ArrayList<>();
Set<String> orderCodeSet = new HashSet<>();
for (TrunklineAdvanceEntity advanceEntity : advanceEntityList) {
orderCodeSet.add(advanceEntity.getOrderCode());
@ -824,13 +825,16 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
waybillOrderEntities.add(waybillOrderEntity);
// orderCodes.add(advanceEntity.getOrderCode());
advanceEntity.setWaybillStatus("1");
advanceEntity.setWaybillNo(waybillNo);
TrunklineAdvanceEntity updateAdvanceEntity = new TrunklineAdvanceEntity();
updateAdvanceEntity.setId(advanceId);
updateAdvanceEntity.setWaybillStatus("1");
updateAdvanceEntity.setWaybillNo(waybillNo);
updateAdvanceEntityList.add(updateAdvanceEntity);
}
trunklineWaybillOrderService.saveBatch(waybillOrderEntities);
//修改暂存单的状态为已开单
advanceService.updateBatchById(advanceEntityList);
advanceService.updateBatchById(updateAdvanceEntityList);
//更新暂存单包件的运单信息
@ -1010,7 +1014,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
//如果发货单位没有id值,则把发货单位信息自动添加到client中
BasicdataClientEntity clientEntity = basicdataClientClient.findByName(shipper);
if(Objects.isNull(clientEntity)){
shipperId = saveNewClient(openOrderDTO.getShipper(), openOrderDTO.getShipperName(), openOrderDTO.getShipperMobile(), openOrderDTO.getShipperAddress(), "6");
shipperId = saveNewClient(openOrderDTO.getShipper(), openOrderDTO.getShipperName(), openOrderDTO.getShipperMobile(), openOrderDTO.getShipperAddress(), "7");
}else{
shipperId = clientEntity.getId();
}
@ -1028,7 +1032,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
//如果收货单位没有id值,则把收货单位信息自动添加到client中
BasicdataClientEntity clientEntity = basicdataClientClient.findByName(consignee);
if(Objects.isNull(clientEntity)){
consigneeId = saveNewClient(openOrderDTO.getConsignee(), openOrderDTO.getConsigneeName(), openOrderDTO.getConsigneeMobile(), openOrderDTO.getConsigneeAddress(), "2");
consigneeId = saveNewClient(openOrderDTO.getConsignee(), openOrderDTO.getConsigneeName(), openOrderDTO.getConsigneeMobile(), openOrderDTO.getConsigneeAddress(), "7");
}else{
consigneeId = clientEntity.getId();
}
@ -4037,7 +4041,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
Long shipperId = openOrderDTO.getShipperId();
if (Objects.isNull(shipperId)) {
//如果发货单位没有id值,则把发货单位信息自动添加到client中
shipperId = saveNewClient(openOrderDTO.getShipper(), openOrderDTO.getShipperName(), openOrderDTO.getShipperMobile(), openOrderDTO.getShipperAddress(), "6");
shipperId = saveNewClient(openOrderDTO.getShipper(), openOrderDTO.getShipperName(), openOrderDTO.getShipperMobile(), openOrderDTO.getShipperAddress(), "7");
}
waybillEntity.setShipperId(shipperId);
waybillEntity.setShipper(openOrderDTO.getShipper());
@ -4048,7 +4052,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
Long consigneeId = openOrderDTO.getConsigneeId();//收货单位id
if (Objects.isNull(consigneeId)) {
//如果收货单位没有id值,则把收货单位信息自动添加到client中
consigneeId = saveNewClient(openOrderDTO.getConsignee(), openOrderDTO.getConsigneeName(), openOrderDTO.getConsigneeMobile(), openOrderDTO.getConsigneeAddress(), "2");
consigneeId = saveNewClient(openOrderDTO.getConsignee(), openOrderDTO.getConsigneeName(), openOrderDTO.getConsigneeMobile(), openOrderDTO.getConsigneeAddress(), "7");
}
waybillEntity.setConsigneeId(consigneeId);
waybillEntity.setConsignee(openOrderDTO.getConsignee());
@ -5491,7 +5495,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
if(Objects.isNull(newShipperId)){
BasicdataClientEntity clientEntity = basicdataClientClient.findByName(newShipper);
if(Objects.isNull(clientEntity)){
newShipperId = saveNewClient(openOrderDTO.getShipper(), openOrderDTO.getShipperName(), openOrderDTO.getShipperMobile(), openOrderDTO.getShipperAddress(), "6");
newShipperId = saveNewClient(openOrderDTO.getShipper(), openOrderDTO.getShipperName(), openOrderDTO.getShipperMobile(), openOrderDTO.getShipperAddress(), "7");
}else{
newShipperId = clientEntity.getId();
}
@ -5531,7 +5535,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
waybillEntity.setServiceType(1);
BasicdataClientEntity clientEntity = basicdataClientClient.findByName(newConsignee);
if(Objects.isNull(clientEntity)){
newConsigneeId = saveNewClient(openOrderDTO.getConsignee(), openOrderDTO.getConsigneeName(), openOrderDTO.getConsigneeMobile(), openOrderDTO.getConsigneeAddress(), "2");
newConsigneeId = saveNewClient(openOrderDTO.getConsignee(), openOrderDTO.getConsigneeName(), openOrderDTO.getConsigneeMobile(), openOrderDTO.getConsigneeAddress(), "7");
}else{
newConsigneeId = clientEntity.getId();
waybillEntity.setServiceType(clientEntity.getTypeService());

23
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -1598,11 +1598,14 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
List<TrunklineCarsOrderDTO> lineCarsOrderList = carsLoadLineDTO.getAddList();
//把lineCarsOrderList中的所有运单号合并成一个集合
List<String> waybillNos = lineCarsOrderList.stream().map(TrunklineCarsOrderDTO::getWaybillNo).collect(Collectors.toList());
List<WarehouseWaybillEntity> freezeOrAbolishWaybillList = warehouseWaybillClient.findFreezeOrAbolishByWaybillNos(waybillNos);
if (!CollUtil.isEmpty(freezeOrAbolishWaybillList)) {
log.warn("##########saveNew: 运单有变动,请重新做计划");
throw new CustomerException(400, "运单有变动,请重新做计划");
if(!waybillNos.isEmpty()){
List<WarehouseWaybillEntity> freezeOrAbolishWaybillList = warehouseWaybillClient.findFreezeOrAbolishByWaybillNos(waybillNos);
if (!CollUtil.isEmpty(freezeOrAbolishWaybillList)) {
log.warn("##########saveNew: 运单有变动,请重新做计划");
throw new CustomerException(400, "运单有变动,请重新做计划");
}
}
for (TrunklineCarsOrderDTO carsOrderDTO : lineCarsOrderList) {
Integer planNum = carsOrderDTO.getPlanNum();
String orderCode = carsOrderDTO.getOrderCode();
@ -11645,11 +11648,13 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
//判断包件是否已入库
DistributionParcelListEntity distributionParcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(orderPackageCode, warehouseId);
if (!Objects.isNull(distributionParcelListEntity)) {
String orderPackageStatus = distributionParcelListEntity.getOrderPackageStatus();
if ("20".equals(orderPackageStatus) || "30".equals(orderPackageStatus)) {
log.warn("##############unloadPackage: 包件已入库 orderPackageCode={} warehouseId={}", orderPackageCode, warehouseId);
return Resp.scanFail(200,"包件已入库", "包件已入库");
}
// String orderPackageStatus = distributionParcelListEntity.getOrderPackageStatus();
// if ("20".equals(orderPackageStatus) || "30".equals(orderPackageStatus)) {
// log.warn("##############unloadPackage: 包件已入库 orderPackageCode={} warehouseId={}", orderPackageCode, warehouseId);
// return Resp.scanFail(200,"包件已入库", "包件已入库");
// }
log.warn("##############unloadPackage: 包件已入库 orderPackageCode={} warehouseId={}", orderPackageCode, warehouseId);
return Resp.scanFail(200,"包件已入库", "包件已入库");
}

Loading…
Cancel
Save