Browse Source

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

master
pref_mail@163.com 8 months ago
parent
commit
88fa124b9a
  1. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java
  2. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/bean/MyExcelUtil.java
  3. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java
  4. 12
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistrilbutionBillLadingController.java
  5. 13
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml
  6. 12
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  7. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistrilbutionBillLadingService.java
  8. 46
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  9. 17
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  10. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
  11. 14
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

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

@ -1438,7 +1438,6 @@ public class DistributionStockupAppController extends BladeController {
entity.setOutboundType(stockupEntity.getTypeService()); entity.setOutboundType(stockupEntity.getTypeService());
// entity.setStockupAreaId(stockupDTO.getStockupAllocationId()); // entity.setStockupAreaId(stockupDTO.getStockupAllocationId());
// entity.setStockupArea(stockupDTO.getStockupAllocationName()); // entity.setStockupArea(stockupDTO.getStockupAllocationName());
distributionStockService.save(entity);
// //修改备货时间 // //修改备货时间
distributionAsyncService.updateStockupStockListDate(stockupDTO); distributionAsyncService.updateStockupStockListDate(stockupDTO);
// dataSourceTransactionManager.commit(transactionStatus);//提交 // dataSourceTransactionManager.commit(transactionStatus);//提交
@ -1469,7 +1468,9 @@ public class DistributionStockupAppController extends BladeController {
jsonObject.put("type", 2); jsonObject.put("type", 2);
jsonObject.put("num", 1); jsonObject.put("num", 1);
warehouseUpdownStockUpAreaClient.upStockUpShelf(jsonObject); warehouseUpdownStockUpAreaClient.upStockUpShelf(jsonObject);
entity.setStockupAreaId(stockupDTO.getStockupAllocationId());
} }
distributionStockService.save(entity);
//扫码成功 //扫码成功
return Resp.scanSuccess(PdaAudioLingoStatus.saomiaochenggong.getName(), audioValue); return Resp.scanSuccess(PdaAudioLingoStatus.saomiaochenggong.getName(), audioValue);
@ -1611,7 +1612,6 @@ public class DistributionStockupAppController extends BladeController {
entity.setOutboundType(distributionStockupEntity.getTypeService()); entity.setOutboundType(distributionStockupEntity.getTypeService());
// entity.setStockupArea(stockupDTO.getStockupAllocationName()); // entity.setStockupArea(stockupDTO.getStockupAllocationName());
// entity.setStockupAreaId(stockupDTO.getStockupAllocationId()); // entity.setStockupAreaId(stockupDTO.getStockupAllocationId());
distributionStockService.save(entity);
//修改订单备货状态 //修改订单备货状态
distributionAsyncService.updateStockArticleStock(one.getStockArticleId()); distributionAsyncService.updateStockArticleStock(one.getStockArticleId());
//修改备货时间 //修改备货时间
@ -1659,7 +1659,10 @@ public class DistributionStockupAppController extends BladeController {
jsonObject.put("num", 1); jsonObject.put("num", 1);
//进行了备货库位的选择才进行备货库位的上架 //进行了备货库位的选择才进行备货库位的上架
warehouseUpdownStockUpAreaClient.upStockUpShelf(jsonObject); warehouseUpdownStockUpAreaClient.upStockUpShelf(jsonObject);
entity.setStockupAreaId(stockupDTO.getStockupAllocationId());
} }
distributionStockService.save(entity);
//修改包件备货状态 //修改包件备货状态
DistributionParcelListEntity parcelListEntity = new DistributionParcelListEntity(); DistributionParcelListEntity parcelListEntity = new DistributionParcelListEntity();
parcelListEntity.setId(entity.getParcelListId()); parcelListEntity.setId(entity.getParcelListId());

5
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/bean/MyExcelUtil.java

@ -136,10 +136,9 @@ public class MyExcelUtil extends ExcelUtil {
response.setCharacterEncoding("UTF-8"); response.setCharacterEncoding("UTF-8");
outputStream = response.getOutputStream(); outputStream = response.getOutputStream();
ExcelWriter build = EasyExcel.write(outputStream).build(); ExcelWriter build = EasyExcel.write(outputStream).build();
WriteSheet orderList = EasyExcel.writerSheet("订单列表").head(DistributionBillOrderExcel.class).build(); WriteSheet orderList = EasyExcel.writerSheet("订单列表").head(DistributionBillOrderExcel.class).build();
WriteSheet inventoryList = EasyExcel.writerSheet("库存品列表").head(DistributionBillOrderPackExcel.class).build(); WriteSheet packageList = EasyExcel.writerSheet("包件列表").head(DistributionBillOrderPackExcel.class).build();
WriteSheet packageList = EasyExcel.writerSheet("包件列表").head(DistributionBillInventoryExcel.class).build(); WriteSheet inventoryList = EasyExcel.writerSheet("库存品列表").head(DistributionBillInventoryExcel.class).build();
if (Func.isNotEmpty(map.getBillOrderExcelList())){ if (Func.isNotEmpty(map.getBillOrderExcelList())){
build.write(map.getBillOrderExcelList(),orderList); build.write(map.getBillOrderExcelList(),orderList);
} }

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java

@ -113,9 +113,7 @@ public class DistributionReservationController extends BladeController {
} }
IPage<DistributionReservationEntity> pages = reservationService.page(Condition.getPage(query),lambda ); IPage<DistributionReservationEntity> pages = reservationService.page(Condition.getPage(query),lambda );
pages.getRecords().forEach(i ->{ pages.getRecords().forEach(i ->{
log.info("查询用户》》》》》created_user:{}",i.getCreateUser());
R<User> userR = userClient.userInfoById(i.getCreateUser()); R<User> userR = userClient.userInfoById(i.getCreateUser());
log.info("查询用户结果》》》》》data:{}",userR.getData().getName());
i.setOperator(userR.getData().getName()); i.setOperator(userR.getData().getName());
}); });

12
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistrilbutionBillLadingController.java

@ -362,9 +362,15 @@ public class DistrilbutionBillLadingController extends BladeController {
return distrilbutionBillLadingService.batchSign(distrilbutionBillLading); return distrilbutionBillLadingService.batchSign(distrilbutionBillLading);
} }
/**
* 查询自提单的包件ID列表
*/
@GetMapping("/getBillLadingPackageIds")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "查询自提单的包件ID列表", notes = "传入ids")
public R getBillLadingPackageIds( @RequestParam Long id,@RequestParam Long orderId) {
return distrilbutionBillLadingService.getBillLadingPackageIds(id,orderId);
}
/** /**
* 导出数据 * 导出数据

13
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml

@ -573,10 +573,19 @@
AND ldrs.stock_article_status IN ( 1, 3 ) AND ldrs.stock_article_status IN ( 1, 3 )
) ordNub, ) ordNub,
COALESCE ( lds.received_quantity + lds.receivedin_quantity, 0 ) signNub, COALESCE ( lds.received_quantity + lds.receivedin_quantity, 0 ) signNub,
ldsk.stockup_area stockupArea,
(SELECT SUM(reservation_num) FROM logpm_distribution_reservation_stocklist WHERE reservation_id = ldr.id ) inventoryNub, (SELECT SUM(reservation_num) FROM logpm_distribution_reservation_stocklist WHERE reservation_id = ldr.id ) inventoryNub,
IFNULL((SELECT SUM(loaded_nub) FROM logpm_distribution_loadscan WHERE reservation_id = lds.reservation_id AND is_abnormal_loading != 2 AND is_deleted = 0 ),0) + IFNULL((SELECT SUM(loaded_nub) FROM logpm_distribution_loadscaninvn WHERE reservation_id = lds.reservation_id AND scan_status != 1 AND is_deleted = 0 ),0) AS loadingNub, IFNULL((SELECT SUM(loaded_nub) FROM logpm_distribution_loadscan WHERE reservation_id = lds.reservation_id AND is_abnormal_loading != 2 AND is_deleted = 0 ),0) + IFNULL((SELECT SUM(loaded_nub) FROM logpm_distribution_loadscaninvn WHERE reservation_id = lds.reservation_id AND scan_status != 1 AND is_deleted = 0 ),0) AS loadingNub,
IFNULL((SELECT SUM(stock_quantity) FROM logpm_distribution_stock WHERE reservation_id = lds.reservation_id AND is_deleted = 0 ),0) AS stockupNum IFNULL((SELECT SUM(stock_quantity) FROM logpm_distribution_stock WHERE reservation_id = lds.reservation_id AND is_deleted = 0 ),0) AS stockupNum,
(SELECT
GROUP_CONCAT( DISTINCT lwga.qr_code ) stockupArea
FROM
logpm_distribution_signfor AS sign
LEFT JOIN logpm_distribution_stock AS lds ON lds.reservation_id = sign.reservation_id
LEFT JOIN logpm_warehouse_goods_allocation AS lwga ON lds.stockup_area_id = lwga.id
WHERE
sign.reservation_id = ldr.id
GROUP BY
sign.delivery_id) AS stockupArea
FROM FROM
logpm_distribution_signfor lds logpm_distribution_signfor lds
LEFT JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id LEFT JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id

12
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml

@ -1052,7 +1052,17 @@
(select lds.reservation_id (select lds.reservation_id
from logpm_distribution_signfor lds from logpm_distribution_signfor lds
where lds.delivery_id = lddl.id ) and ldr.reservation_status != '40' where lds.delivery_id = lddl.id ) and ldr.reservation_status != '40'
) consignee ) consignee,
(SELECT
GROUP_CONCAT( DISTINCT lwga.qr_code ) stockupArea
FROM
logpm_distribution_signfor AS sign
LEFT JOIN logpm_distribution_stock AS lds ON lds.reservation_id = sign.reservation_id
LEFT JOIN logpm_warehouse_goods_allocation AS lwga ON lds.stockup_area_id = lwga.id
WHERE
sign.delivery_id = lddl.id
GROUP BY
sign.delivery_id) AS stockupArea
FROM FROM
logpm_distribution_delivery_list lddl logpm_distribution_delivery_list lddl
left join logpm_distribution_delivery_self ldds on lddl.id =ldds.delivery_id left join logpm_distribution_delivery_self ldds on lddl.id =ldds.delivery_id

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistrilbutionBillLadingService.java

@ -270,4 +270,11 @@ public interface IDistrilbutionBillLadingService extends BaseService<Distrilbuti
* @return * @return
*/ */
DistributionBillLadingExcelDTO exportDistributionBillLadingDetail(Long id); DistributionBillLadingExcelDTO exportDistributionBillLadingDetail(Long id);
/**
* 查询自提单的包件ID列表
* @param id
* @return
*/
R getBillLadingPackageIds(Long id,Long orderId);
} }

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

@ -2384,31 +2384,33 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
log.info(">>>>>>>>>>>>>>>>> distributionAppDeliveryListVOS 司机配送任务列表 {}", distributionAppDeliveryListVOS); log.info(">>>>>>>>>>>>>>>>> distributionAppDeliveryListVOS 司机配送任务列表 {}", distributionAppDeliveryListVOS);
//转换字典字段 //转换字典字段
for (DistributionAppDeliveryListVO distributionAppDeliveryListVO : distributionAppDeliveryListVOS) { for (DistributionAppDeliveryListVO distributionAppDeliveryListVO : distributionAppDeliveryListVOS) {
distributionAppDeliveryListVO.setScannedNumber(getCarLaodNum(distributionAppDeliveryListVO.getId())); distributionAppDeliveryListVO.setScannedNumber(getCarLaodNum(distributionAppDeliveryListVO.getId()));
// 调用下 查询装车件数的方法 // 调用下 查询装车件数的方法
//查询备货区 //查询备货区
if (StringUtils.isNotBlank(distributionAppDeliveryListVO.getReservationId())) { // if (StringUtils.isNotBlank(distributionAppDeliveryListVO.getReservationId())) {
List<String> list = CommonUtil.stringNum(distributionAppDeliveryListVO.getReservationId()); // List<String> list = CommonUtil.stringNum(distributionAppDeliveryListVO.getReservationId());
QueryWrapper<DistributionStockupInfoEntity> queryWrapper = new QueryWrapper(); // QueryWrapper<DistributionStockupInfoEntity> queryWrapper = new QueryWrapper();
//
if (list.size() > 1) { // if (list.size() > 1) {
queryWrapper.in("reservation_id", list); // queryWrapper.in("reservation_id", list);
} else { // } else {
queryWrapper.eq("reservation_id", distributionAppDeliveryListVO.getReservationId()); // queryWrapper.eq("reservation_id", distributionAppDeliveryListVO.getReservationId());
} // }
List<DistributionStockupInfoEntity> list1 = distributionStockupInfoService.list(queryWrapper); // List<DistributionStockupInfoEntity> list1 = distributionStockupInfoService.list(queryWrapper);
if (!list1.isEmpty()) { // if (!list1.isEmpty()) {
DistributionStockupInfoEntity distributionStockupInfoEntity = list1.get(0); // DistributionStockupInfoEntity distributionStockupInfoEntity = list1.get(0);
DistributionStockupEntity distributionStockupEntity = distributionStockupMapper.selectById(distributionStockupInfoEntity.getStockupId()); // DistributionStockupEntity distributionStockupEntity = distributionStockupMapper.selectById(distributionStockupInfoEntity.getStockupId());
if (ObjectUtils.isNotNull(distributionStockupEntity)) { // if (ObjectUtils.isNotNull(distributionStockupEntity)) {
distributionAppDeliveryListVO.setStockupArea(distributionStockupEntity.getStockupArea()); // distributionAppDeliveryListVO.setStockupArea(distributionStockupEntity.getStockupArea());
} else { // } else {
distributionAppDeliveryListVO.setStockupArea("无数据"); // distributionAppDeliveryListVO.setStockupArea("无数据");
} // }
} else { // } else {
distributionAppDeliveryListVO.setStockupArea("无数据"); // distributionAppDeliveryListVO.setStockupArea("无数据");
} // }
// }
if (StringUtils.isBlank(distributionAppDeliveryListVO.getStockupArea())){
distributionAppDeliveryListVO.setStockupArea("无数据");
} }
//查询包件签收件数 //查询包件签收件数
Integer lad = distributionLoadscanMapper.selectCount(new QueryWrapper<DistributionLoadscanEntity>().lambda().eq(DistributionLoadscanEntity::getDeliveryId, distributionAppDeliveryListVO.getId()).eq(DistributionLoadscanEntity::getSignforState, 2)).intValue(); Integer lad = distributionLoadscanMapper.selectCount(new QueryWrapper<DistributionLoadscanEntity>().lambda().eq(DistributionLoadscanEntity::getDeliveryId, distributionAppDeliveryListVO.getId()).eq(DistributionLoadscanEntity::getSignforState, 2)).intValue();

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

@ -2701,6 +2701,23 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
log.error("########缺失参数,barcodes:{}", distrilbutionloadingscanDTO.getBarcodes()); log.error("########缺失参数,barcodes:{}", distrilbutionloadingscanDTO.getBarcodes());
return R.fail("存在已签收包件!!"); return R.fail("存在已签收包件!!");
} }
List<Long> ids = parcelListEntities.stream().map(DistributionParcelListEntity::getId).collect(Collectors.toList());
List<DistributionLoadscanAbnormalEntity> abnormalEntities = distributionLoadscanAbnormalService.list(Wrappers.<DistributionLoadscanAbnormalEntity>query().lambda()
.in(DistributionLoadscanAbnormalEntity::getPackageId, ids)
);
if (!abnormalEntities.isEmpty()) {
//判断此包件的异常是否是当前扫描车次和客户
//首先判断存在异常是否不属于当前车次和客户
boolean a = abnormalEntities.stream().allMatch(b -> !deliveryListEntity.getId().equals(b.getDeliveryListId()) || !distrilbutionloadingscanDTO.getReservationId().equals(b.getReservationId()));
if (a){
//该异常属于其他车次
String code = abnormalEntities.stream().filter(c -> !deliveryListEntity.getId().equals(c.getDeliveryListId()) || !distrilbutionloadingscanDTO.getReservationId().equals(c.getReservationId())).map(DistributionLoadscanAbnormalEntity::getPackageCode).collect(Collectors.joining(","));
log.info("包件已在其他车次存在异常 >>>>包条码:{}",code);
log.info("包件已在其他车次存在异常 >>>>当前车次:{},异常车次:{}",deliveryListEntity.getTrainNumber(),abnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getTrainNumber).collect(Collectors.joining(",")));
return R.fail(code+"已在其他车次执行异常!!");
}
//判断具体的装车信息
}
} }
List<DistributionParcelListEntity> parcelListEntityList = distributionReservationMapper.selectPackageListByReservationId(distrilbutionloadingscanDTO.getReservationId()); List<DistributionParcelListEntity> parcelListEntityList = distributionReservationMapper.selectPackageListByReservationId(distrilbutionloadingscanDTO.getReservationId());
//查询该客户是否存在该包件信息 //查询该客户是否存在该包件信息

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

@ -2623,8 +2623,6 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
stockEntity.setGoodsName(stockArticleEntity.getDescriptionGoods()); stockEntity.setGoodsName(stockArticleEntity.getDescriptionGoods());
stockEntity.setMarketId(stockArticleEntity.getMallId()); stockEntity.setMarketId(stockArticleEntity.getMallId());
stockEntity.setReservationCode(reservationEntity.getReservationCode()); stockEntity.setReservationCode(reservationEntity.getReservationCode());
stockEntity.setStockupArea(stockupDTO.getStockupAllocationName());
// stockEntity.setStockupAreaId(stockupDTO.getStockupAllocationId());
if (Func.isNotEmpty(stockupDTO.getAllocationId())) { if (Func.isNotEmpty(stockupDTO.getAllocationId())) {
log.info(method + "库位备货"); log.info(method + "库位备货");
//查询库位零担 //查询库位零担
@ -2692,7 +2690,6 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
} else { } else {
log.info(method + "无库位无托盘备货"); log.info(method + "无库位无托盘备货");
} }
distributionStockService.save(stockEntity);
if (!Func.isEmpty(stockupDTO.getStockupAllocationId())){ if (!Func.isEmpty(stockupDTO.getStockupAllocationId())){
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.put("warehouseId", myCurrentWarehouse.getId()); jsonObject.put("warehouseId", myCurrentWarehouse.getId());
@ -2702,7 +2699,9 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
jsonObject.put("num", stockupDTO.getNum()); jsonObject.put("num", stockupDTO.getNum());
//备货库位上架 //备货库位上架
warehouseUpdownStockUpAreaClient.upStockUpShelf(jsonObject); warehouseUpdownStockUpAreaClient.upStockUpShelf(jsonObject);
stockEntity.setStockupAreaId(stockupDTO.getStockupAllocationId());
} }
distributionStockService.save(stockEntity);
return Resp.scanSuccess("备货成功", "本次成功备货" + stockupDTO.getNum() + "件"); return Resp.scanSuccess("备货成功", "本次成功备货" + stockupDTO.getNum() + "件");
} }

14
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

@ -1362,6 +1362,19 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
return distributionBillLadingExcelDTO; return distributionBillLadingExcelDTO;
} }
@Override
public R getBillLadingPackageIds(Long id,Long orderId) {
List<DistrilbutionBillPackageEntity> list = distrilbutionBillPackageService.list(Wrappers.<DistrilbutionBillPackageEntity>query().lambda()
.eq(DistrilbutionBillPackageEntity::getBillLadingId, id)
.eq(DistrilbutionBillPackageEntity::getStockArticleId, orderId)
.ne(DistrilbutionBillPackageEntity::getPacketBarStatus, "2")
);
if (list.isEmpty()) {
return null;
}
return R.data(list.stream().map(DistrilbutionBillPackageEntity::getParceListId).collect(Collectors.toList()));
}
/** /**
* 转换老系统的ID * 转换老系统的ID
* *
@ -1702,6 +1715,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
List<DistrilbutionBillPackageEntity> list = distrilbutionBillPackageService.list(Wrappers.<DistrilbutionBillPackageEntity>query().lambda() List<DistrilbutionBillPackageEntity> list = distrilbutionBillPackageService.list(Wrappers.<DistrilbutionBillPackageEntity>query().lambda()
.eq(DistrilbutionBillPackageEntity::getBillLadingId, distrilbutionBillLading.getId()) .eq(DistrilbutionBillPackageEntity::getBillLadingId, distrilbutionBillLading.getId())
.eq(DistrilbutionBillPackageEntity::getStockArticleId, k) .eq(DistrilbutionBillPackageEntity::getStockArticleId, k)
.ne(DistrilbutionBillPackageEntity::getPacketBarStatus, "2")
); );
//没有数据 //没有数据
if (list.isEmpty()) { if (list.isEmpty()) {

Loading…
Cancel
Save