Browse Source

Merge branch 'dev' into pre-production

master
汤建军 8 months ago
parent
commit
4f3bb989e5
  1. 14
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java
  2. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/StockupDTO.java
  3. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml
  4. 29
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  5. 46
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  6. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
  7. 2
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportDeliverMapper.xml
  8. 6
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownStockupAreaServiceImpl.java

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

@ -1468,7 +1468,7 @@ public class DistributionStockupAppController extends BladeController {
jsonObject.put("type", 2);
jsonObject.put("num", 1);
//TODO
// warehouseUpdownStockUpAreaClient.upStockUpShelf(jsonObject);
warehouseUpdownStockUpAreaClient.upStockUpShelf(jsonObject);
//扫码成功
return Resp.scanSuccess(PdaAudioLingoStatus.saomiaochenggong.getName(), audioValue);
case 2:
@ -1534,7 +1534,7 @@ public class DistributionStockupAppController extends BladeController {
String packetBarCode = stockupDTO.getPacketBarCode();//包件码
Long stockupId = stockupDTO.getStockupId();//备货任务ID
Long reservationId = stockupDTO.getReservationId();//预约单id
// Long stockUpAllocationId = stockupDTO.getStockupAllocationId();//备货库位ID
Long stockUpAllocationId = stockupDTO.getStockupAllocationId();//备货库位ID
if (Objects.isNull(myCurrentWarehouse)) {
log.warn("##################stockupScan: 未选择仓库,订单自编号为空");
return R.fail(403,"未授权!!");
@ -1555,10 +1555,10 @@ public class DistributionStockupAppController extends BladeController {
log.warn("##################stockupScan: 包件扫码,预约单id为空");
return R.fail("包件扫码:预约单id不能为空");
}
// if (Objects.isNull(stockUpAllocationId)) {
// log.warn("##################stockupScan: 备货库位不存在,stockUpAllocationId:{}",stockUpAllocationId);
// return Resp.scanFail("请扫描备货库位","请扫描备货库位");
// }
if (Objects.isNull(stockUpAllocationId)) {
log.warn("##################stockupScan: 备货库位不存在,stockUpAllocationId:{}",stockUpAllocationId);
return Resp.scanFail("请扫描备货库位","请扫描备货库位");
}
Integer integer = distributionStockupService.selectPackage(stockupDTO);
switch (integer) {
@ -1662,7 +1662,7 @@ public class DistributionStockupAppController extends BladeController {
jsonObject.put("num", 1);
//进行了备货库位的选择才进行备货库位的上架
//TODO
// warehouseUpdownStockUpAreaClient.upStockUpShelf(jsonObject);
warehouseUpdownStockUpAreaClient.upStockUpShelf(jsonObject);
//修改包件备货状态
DistributionParcelListEntity parcelListEntity = new DistributionParcelListEntity();
parcelListEntity.setId(entity.getParcelListId());

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/StockupDTO.java

@ -13,8 +13,8 @@ public class StockupDTO implements Serializable {
private String stockupDateEnd;//备货日期
private Integer status;//0未完成 1已完成
// private Long stockupAllocationId;//0未完成 1已完成
// private String stockupAllocationName;//0未完成 1已完成
private Long stockupAllocationId;//0未完成 1已完成
private String stockupAllocationName;//0未完成 1已完成
/**
* 客户名城

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

@ -832,7 +832,7 @@
IFNULL(SUM(ldbls.quantity),0) AS actual_plan,
IFNULL(SUM(ldbls.quantity),0) AS delivery,
IFNULL(SUM(ldbls.quantity),0) AS sign,
(SELECT GROUP_CONCAT(site) FROM logpm_distribution_print WHERE bill_lading_id = ldbl.id GROUP BY bill_lading_id)
(SELECT GROUP_CONCAT(site) FROM logpm_distribution_print WHERE bill_lading_id = ldbl.id GROUP BY bill_lading_id) AS image
FROM
logpm_distrilbution_bill_lading AS ldbl
LEFT JOIN logpm_distribution_bill_lading_scan AS ldbls ON ldbls.bill_lading_id = ldbl.id AND ldbls.is_deleted = 0

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

@ -595,20 +595,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//获取当前用户司机
DistributionDeliveryListEntity distributionDeliveryListEntity = distributionDeliveryListMapper.selectById(distrilbutionloadingscanDTO.getDeliveryId());
List<DistributionLoadscanAbnormalEntity> abnormalEntities = distributionLoadscanAbnormalService.list(Wrappers.<DistributionLoadscanAbnormalEntity>query().lambda()
.eq(DistributionLoadscanAbnormalEntity::getPackageCode, distrilbutionloadingscanDTO.getBarcode())
);
if (!abnormalEntities.isEmpty()) {
//判断异常是否属于自身
boolean flag = abnormalEntities.stream().allMatch(a -> !distributionDeliveryListEntity.getId().equals(a.getDeliveryListId()) || !distrilbutionloadingscanDTO.getReservationId().equals(a.getReservationId()));
if (flag){
//该异常属于其他车次
String collect = abnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getTrainNumber).collect(Collectors.joining(","));
log.info("包件已在其他车次存在异常 >>>>当前车次:{},其他车次:{}",distributionDeliveryListEntity.getTrainNumber(),collect);
return Resp.scanFail("包件已在其他车次存在异常", "包件已在其他车次存在异常");
}
}
//异步确认包条扫描信息
// distributionAsyncService.changeOrderSignforStatus(distrilbutionloadingscanDTO.getBarcode());
List<Long> packageLockIds = new ArrayList<>();
@ -657,6 +644,22 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
}
List<DistributionLoadscanAbnormalEntity> abnormalEntities = distributionLoadscanAbnormalService.list(Wrappers.<DistributionLoadscanAbnormalEntity>query().lambda()
.eq(DistributionLoadscanAbnormalEntity::getPackageCode, distrilbutionloadingscanDTO.getBarcode())
.eq(DistributionLoadscanAbnormalEntity::getPackageId, parcelList.getId())
);
if (!abnormalEntities.isEmpty()) {
//判断异常是否属于自身
boolean flag = abnormalEntities.stream().allMatch(a -> !distributionDeliveryListEntity.getId().equals(a.getDeliveryListId()) || !distrilbutionloadingscanDTO.getReservationId().equals(a.getReservationId()));
if (flag){
//该异常属于其他车次
String collect = abnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getTrainNumber).collect(Collectors.joining(","));
log.info("包件已在其他车次存在异常 >>>>当前车次:{},其他车次:{}",distributionDeliveryListEntity.getTrainNumber(),collect);
return Resp.scanFail("包件已在其他车次存在异常", "包件已在其他车次存在异常");
}
}

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

@ -2424,34 +2424,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
.ne(DisStockListDetailEntity::getStockPackageStatus, ReservationPackageStatusConstant.quxiao.getValue())
);
//查询当前客户的所有异常情况
List<DistributionLoadscanAbnormalEntity> abnormalEntities = distributionLoadscanAbnormalService.list(Wrappers.<DistributionLoadscanAbnormalEntity>query().lambda()
.eq(DistributionLoadscanAbnormalEntity::getPackageCode, distrilbutionloadingscanDTO.getBarcode())
// .eq(DistributionLoadscanAbnormalEntity::getAuditingStatus, 1)
//修改 状态
);
if (!abnormalEntities.isEmpty()) {
//判断此包件的异常是否是当前扫描车次和客户
//首先判断存在异常是否不属于当前车次和客户
boolean flag = abnormalEntities.stream().allMatch(a -> !deliveryListEntity.getId().equals(a.getDeliveryListId()) || !distrilbutionloadingscanDTO.getReservationId().equals(a.getReservationId()));
if (flag){
//该异常属于其他车次
String collect = abnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getTrainNumber).collect(Collectors.joining(","));
log.info("包件已在其他车次存在异常 >>>>当前车次:{},其他车次:{}",deliveryListEntity.getTrainNumber(),collect);
return Resp.scanFail("包件已在其他车次存在异常", "包件已在其他车次存在异常");
}
//判断具体的装车信息
// boolean flag = abnormalEntities.stream().filter(f->f.getAuditingStatus() == 1).allMatch(a -> deliveryListEntity.getId().equals(a.getDeliveryListId()) && distrilbutionloadingscanDTO.getReservationId().equals(a.getReservationId()));
// if (flag){
// //存在异常 进行异常签收还是异常装车区分
// return Resp.scanFail("包件已存在异常", "包件已存在异常");
// }
// String collect = abnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getTrainNumber).collect(Collectors.joining(","));
// log.info("包件已在其他车次存在异常 >>>>当前车次:{},其他车次:{}",deliveryListEntity.getTrainNumber(),collect);
// return Resp.scanFail("包件已在其他车次存在异常", "包件已在其他车次存在异常");
}
if (Func.isNotEmpty(list)) {
//满足条件此码必定为库存品
//判断该库存品是否属于当前客户
@ -2466,6 +2439,25 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
//查询该客户是否存在该包件信息
List<DistributionParcelListEntity> collect = parcelListEntityList.stream().filter(p -> p.getOrderPackageCode().equals(distrilbutionloadingscanDTO.getBarcode())).collect(Collectors.toList());
if (Func.isNotEmpty(collect) && collect.size() == 1) {
List<DistributionLoadscanAbnormalEntity> abnormalEntities = distributionLoadscanAbnormalService.list(Wrappers.<DistributionLoadscanAbnormalEntity>query().lambda()
.eq(DistributionLoadscanAbnormalEntity::getPackageCode, distrilbutionloadingscanDTO.getBarcode())
.eq(DistributionLoadscanAbnormalEntity::getPackageId, collect.get(0).getId())
//修改 状态
);
if (!abnormalEntities.isEmpty()) {
//判断此包件的异常是否是当前扫描车次和客户
//首先判断存在异常是否不属于当前车次和客户
boolean flag = abnormalEntities.stream().allMatch(a -> !deliveryListEntity.getId().equals(a.getDeliveryListId()) || !distrilbutionloadingscanDTO.getReservationId().equals(a.getReservationId()));
if (flag){
//该异常属于其他车次
String info = abnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getTrainNumber).collect(Collectors.joining(","));
log.info("包件已在其他车次存在异常 >>>>当前车次:{},其他车次:{}",deliveryListEntity.getTrainNumber(),info);
return Resp.scanFail("包件已在其他车次存在异常", "包件已在其他车次存在异常");
}
//判断具体的装车信息
}
//存在则查询该包件是否进行装车
DistributionLoadscanEntity loadscanEntity = distributionLoadscanMapper.selectOne(Wrappers.<DistributionLoadscanEntity>query().lambda()
.ne(DistributionLoadscanEntity::getScanStatus, 1)

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

@ -2004,7 +2004,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
jsonObject.put("type", 4);
jsonObject.put("num", list1.size());
// TODO
// warehouseUpdownStockUpAreaClient.upStockUpShelf(jsonObject);
warehouseUpdownStockUpAreaClient.upStockUpShelf(jsonObject);
}
int i = list1.isEmpty() ? 0 : list1.size();
return Resp.scanSuccess("整托拣货" + i + "件", "整托拣货" + i + "件");
@ -2700,7 +2700,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
jsonObject.put("num", stockupDTO.getNum());
//备货库位上架
//TODO
// warehouseUpdownStockUpAreaClient.upStockUpShelf(jsonObject);
warehouseUpdownStockUpAreaClient.upStockUpShelf(jsonObject);
return Resp.scanSuccess("备货成功", "本次成功备货" + stockupDTO.getNum() + "件");
}

2
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportDeliverMapper.xml

@ -213,7 +213,7 @@
sum(t.received_quantity) reNum
from logpm_distribution_loadscaninvn t
group by t.reservation_id) loadscaninvn on loadscaninvn.reservation_id = obj.id
where obj.reservation_status <![CDATA[<]]> '40'
where obj.reservation_status <![CDATA[<]]> '40' and lddl.customers_number > 0
) t
${ew.customSqlSegment}
</select>

6
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownStockupAreaServiceImpl.java

@ -171,7 +171,7 @@ public class WarehouseUpdownStockupAreaServiceImpl extends BaseServiceImpl<Wareh
.eq(WarehouseUpdownStockupAreaEntity::getWarehouseId, warehouseId)
.eq(WarehouseUpdownStockupAreaEntity::getAssociationId, stockArticleEntity.getId())
.eq(WarehouseUpdownStockupAreaEntity::getAssociationValue, stockArticleEntity.getOrderCode())
.eq(WarehouseUpdownStockupAreaEntity::getAssociationValue, "3")
.eq(WarehouseUpdownStockupAreaEntity::getGoodsType, "3")
);
if (Func.isEmpty(updownStockupAreaEntity)) {
warehouseUpdownStockupArea.setAssociationValue(stockArticleEntity.getOrderCode());
@ -181,7 +181,7 @@ public class WarehouseUpdownStockupAreaServiceImpl extends BaseServiceImpl<Wareh
warehouseUpdownStockupArea.setGoodsName(stockArticleEntity.getDescriptionGoods());
warehouseUpdownStockupArea.setMarketName(stockArticleEntity.getMallName());
warehouseUpdownStockupArea.setMarketId(stockArticleEntity.getMallId());
warehouseUpdownStockupArea.setGoodsType("2");
warehouseUpdownStockupArea.setGoodsType("3");
this.save(warehouseUpdownStockupArea);
} else {
int newNum = updownStockupAreaEntity.getNum() + num;
@ -217,7 +217,7 @@ public class WarehouseUpdownStockupAreaServiceImpl extends BaseServiceImpl<Wareh
warehouseUpdownStockupAreaLogEntity.setNum(num);
warehouseUpdownStockupAreaLogService.save(warehouseUpdownStockupAreaLogEntity);
//修改库位状态
basicdataGoodsAllocationClient.updateAllocationStatus(stockUpAllocationId,"2");
basicdataGoodsAllocationClient.updateAllocationStatus(stockUpAllocationId,"3");
return null;
}

Loading…
Cancel
Save