Browse Source

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

single_db
Diss 1 year ago
parent
commit
2e54109ff3
  1. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java
  2. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml
  3. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/StockupStateUpdateHandler.java
  4. 39
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
  5. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  6. 12
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  7. 3842
      script/docker/app/prometheus/dashboard/bladex-linux.json

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

@ -1604,11 +1604,16 @@ public class DistributionStockupAppController extends BladeController {
mapState.put("createTime", new Date().getTime());
//将消息携带绑定键值
rabbitTemplate.convertAndSend(RabbitConstant.STOCKUP_STATE_UPDATE_EXCHANGE, RabbitConstant.STOCKUP_STATE_UPDATE_ROUTING, mapState);
String audioValue = DictBizCache.getValue(DictBizConstant.PDA_AUDIO, PdaAudioLingoStatus.saomiaochenggong.getValue());
log.info(">>>>>>>>>>>>>>>>>>>> 对扫码的包件进行下架");
//将消息携带绑定键值
rabbitTemplate.convertAndSend(RabbitConstant.STOCKUP_STATE_UPDATE_EXCHANGE, RabbitConstant.STOCKUP_STATE_UPDATE_ROUTING, mapState,message -> {
message.getMessageProperties()
.setHeader("x-delay", 3000);
return message;
});
//查询是否货位数据是否该下架
// distributionAsyncService.stockupSelfOffShelf(stockupDTO);
return Resp.scanSuccess(PdaAudioLingoStatus.saomiaochenggong.getName(), audioValue);

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

@ -452,7 +452,7 @@
FROM
logpm_distribution_stock_list ldsl
<where>
ldsl.service_type = #{par.serviceType} and ldsl.warehouse_id = #{par.warehouseId} and ldsl.is_deleted = 0
ldsl.service_type = #{par.serviceType} and ldsl.warehouse_id = #{par.warehouseId} and ldsl.is_deleted = 0 and (ldsl.quantity_stock - ldsl.quantity_occupied) > 0
<if test="par.incomingBatch != null and par.incomingBatch != ''">
and ldsl.incoming_batch like concat('%',#{par.incomingBatch},'%')
</if>

9
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/StockupStateUpdateHandler.java

@ -35,13 +35,18 @@ public class StockupStateUpdateHandler {
public void stockupScanHandler(Map map, Message message, Channel channel) throws IOException, InterruptedException {
log.info("##################StockupStateUpdateHandler: 处理补全扫码作业其他数据");
final long deliveryTag = message.getMessageProperties().getDeliveryTag();
StockupDTO messageData = new StockupDTO();
try{
StockupDTO messageData = new StockupDTO();
messageData.setStockupId((Long) map.get("stockupId"));
messageData.setTypeService(String.valueOf( map.get("typeService")));
messageData.setReservationId((Long) map.get("reservationId"));
//查询是否货位数据是否该下架
//查询是否货位数据是否该下架
distributionAsyncService.stockupSelfOffShelf(messageData);
log.info("######STOCKUP_STATE_UPDATE_QUEUE:备货下架查询成功");
}catch (Exception e){
log.error(">>>>>> 备货下架 报错",e);
}
}

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

@ -76,7 +76,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
private final DistributionReservationMapper distributionReservationMapper;
private final DistributionReservationPackageMapper distributionReservationPackageMapper;
private final DistributionParcelListServiceImpl distributionParcelListService;
private final DistributionStockupMapper distributionStockupService;
private final DistributionStockupMapper distributionStockupMapper;
private final DistributionStockupInfoMapper distributionStockupInfoMapper;
private final DistributionReservationStockarticleMapper distributionReservationStockarticleMapper;
private final IDistributionReservationStockarticleService distributionReservationStockarticleService;
@ -653,12 +653,10 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
List<DistributionStockupSelfVO> distributionStockupSelfVO = new ArrayList<>();
if (stockupDTO.getTypeService().equals(DistributionTypeConstant.ziti.getValue())) {
//自
Thread.sleep(300);
distributionStockupSelfVO = distributionStockupService.stockupSelfOffShelf(stockupDTO);
distributionStockupSelfVO = distributionStockupMapper.stockupSelfOffShelf(stockupDTO);
} else {
//商 市
Thread.sleep(300);
distributionStockupSelfVO = distributionStockupService.stockupOffShelf(stockupDTO);
distributionStockupSelfVO = distributionStockupMapper.stockupOffShelf(stockupDTO);
}
//有
List<DistributionStockupSelfVO> collectY = distributionStockupSelfVO.stream().filter(o -> ObjectUtils.isNotNull(o.getAllocationId())).collect(Collectors.toList());
@ -685,27 +683,6 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
});
//没有
/*List<DistributionStockupSelfVO> collectW = distributionStockupSelfVO.stream().filter(o -> ObjectUtils.isNull(o.getAllocationId())).collect(Collectors.toList());
List<String> list = new ArrayList<>();
AtomicInteger a = new AtomicInteger();
AtomicInteger b = new AtomicInteger();
collectW.forEach(i -> {
if (ObjectUtils.isNull(i.getLwugId())) {
a.addAndGet(1);
if (ObjectUtils.isNotNull(i.getLdsId())) {
b.addAndGet(1);
list.add(i.getOrderPackageCode());
}
}
});
if (a.get() == b.get()) {
//下架
list.forEach(i -> {
warehouseUpdownTypeClient.downPackage(i);
});
}*/
}
@Override
@ -1165,7 +1142,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
}
stockupEntity.setId(stockupDTO.getStockupId());
distributionStockupService.updateById(stockupEntity);
distributionStockupMapper.updateById(stockupEntity);
}
@Override
@ -2426,7 +2403,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
//判断数量
int i = (nu.get() + ku.get()) - (nuy.get() + num);
//查询备货状态
DistributionStockupEntity distributionStockupEntity = distributionStockupService.selectById(stockupDTO.getStockupId());
DistributionStockupEntity distributionStockupEntity = distributionStockupMapper.selectById(stockupDTO.getStockupId());
DistributionStockupEntity distributionStockup = new DistributionStockupEntity();
DistributionReservationEntity reservationEntity = new DistributionReservationEntity();
boolean fa = false;
@ -2462,7 +2439,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
if (!fa) {
//没有
//修改备货状态
distributionStockupService.updateById(distributionStockup);
distributionStockupMapper.updateById(distributionStockup);
//修改预约状态
distributionReservationMapper.updateById(reservationEntity);
@ -2555,7 +2532,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
}
});*/
DistributionStockupEntity distributionStockupEntity = distributionStockupService.selectById(stockupDTO.getStockupId());
DistributionStockupEntity distributionStockupEntity = distributionStockupMapper.selectById(stockupDTO.getStockupId());
DistributionStockupEntity distributionStockup = new DistributionStockupEntity();
boolean fa = false;
if (distributionStockupEntity.getStockupStatus().equals(StockupStatusConstant.beihuozhong.getValue())) {
@ -2583,7 +2560,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
}
if (!fa) {
distributionStockupService.updateById(distributionStockup);
distributionStockupMapper.updateById(distributionStockup);
}
//绑定库存品包条码数据

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

@ -6110,7 +6110,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
for (String id : idArray) {
//查询对应配送单
DistributionDeliveryListEntity deliveryListEntity = baseMapper.selectById(id);//配送单
DistributionDeliveryListEntity deliveryListEntity = baseMapper.selectById(Long.parseLong(id));//配送单
if (Objects.isNull(deliveryListEntity)) {
log.warn("#########handleShangPeiData: 配送单信息不存在 deliveryListEntityId={}", id);
throw new CustomerException(403, "配送单信息不存在");

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

@ -1823,7 +1823,11 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
if (Func.isEmpty(oleInventoryList.get(c))) {
mallName.add(distributionStockListDTO.getMarketName());
mallId.add(distributionStockListDTO.getMarketId());
DistributionStockListEntity stockListEntity = distributionStockListService.getById(distributionStockListDTO.getId());
int keyongshuliang = stockListEntity.getQuantityStock() - stockListEntity.getQuantityOccupied();
if (distributionStockListDTO.getReservationNum() > keyongshuliang) {
throw new RuntimeException("库存品库内数量不足!!!");
}
//新增库存品
reservationStocklistEntity.setStocklistId(distributionStockListDTO.getId());
reservationStocklistEntity.setReservationId(id);
@ -2025,8 +2029,10 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
AtomicInteger orderTotal = new AtomicInteger();
//客户数量
AtomicInteger clientTotal = new AtomicInteger();
//客户数量
//包件数量
AtomicInteger deliveryPackageTotal = new AtomicInteger();
//库存品数量
AtomicInteger inventoryNub = new AtomicInteger();
//查询运单信息
//收货单位
Date date = new Date();
@ -2311,6 +2317,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
reservationEntity.setReservationNum(packageTotal.get());
this.updateById(reservationEntity);
deliveryPackageTotal.getAndAdd(reservationEntity.getReservationNum());
inventoryNub.getAndAdd(reservationEntity.getReservationStockListNum());
DistributionSignforEntity distributionSignforEntity = new DistributionSignforEntity();
distributionSignforEntity.setReservationId(reservationEntity.getId());
distributionSignforEntity.setTrainNumber(trainNumberMa);
@ -2398,6 +2405,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
// distributionDeliveryListEntity.setOrderCode(String.join(",", orderNumber));
distributionDeliveryListEntity.setOrderNumber(orderTotal.get());
distributionDeliveryListEntity.setDeliveryNumber(deliveryPackageTotal.get());
distributionDeliveryListEntity.setInventoryNub(inventoryNub.get());
distributionDeliveryListEntity.setNoteNumber(deliveryListMa());
distributionDeliveryListEntity.setCustomersNumber(clientTotal.get());
distributionDeliveryListEntity.setDeliveryListLoadingStatus(DeliveryLoadingStatusConstant.weizhuangche.getValue());

3842
script/docker/app/prometheus/dashboard/bladex-linux.json

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save