Browse Source

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

dist.1.3.0
zhaoqiaobo 9 months ago
parent
commit
e3bd08c92f
  1. 1
      blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java
  2. 6
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationEntity.java
  3. 6
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionReservationVO.java
  4. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java
  5. 219
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  6. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  7. 13
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  8. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/wrapper/DistributionReservationWrapper.java
  9. 3
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/TrayScanDesServiceImpl.java
  10. 36
      blade-service/logpm-report/src/main/java/com/logpm/report/controller/WarehouseIndexController.java
  11. 1
      blade-service/logpm-report/src/main/java/com/logpm/report/dto/IndexDTO.java
  12. 48
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.java
  13. 225
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml
  14. 8
      blade-service/logpm-report/src/main/java/com/logpm/report/service/IWarehouseIndexService.java
  15. 61
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java
  16. 4
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/indexCount/IndexDeliveryDataVO.java
  17. 27
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/indexCount/IndexSignforDataVO.java
  18. 15
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml
  19. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml
  20. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java
  21. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseWaybillDetailClient.java
  22. 7
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWayBillDetailService.java
  23. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java
  24. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java
  25. 12
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWayBillDetailServiceImpl.java

1
blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java

@ -94,6 +94,7 @@ public class DictBizConstant {
// --------------2023-08-24 --------------------- // --------------2023-08-24 ---------------------
public static final String RESERVATION_LIST_LOADING_STATUS = "reservation_loading_status";//预约装车状态 public static final String RESERVATION_LIST_LOADING_STATUS = "reservation_loading_status";//预约装车状态
public static final String RESERVATION_SIGNFOR_STATUS = "reservation_signfor_status";//预约签收状态 public static final String RESERVATION_SIGNFOR_STATUS = "reservation_signfor_status";//预约签收状态
public static final String YES_NO = "yes_no";//预约签收状态
// --------------2023-09-01 --------------------- // --------------2023-09-01 ---------------------
public static final String ORDER_PACKAGE_LOADING_STATUS = "order_package_loading_status";//预约签收状态 public static final String ORDER_PACKAGE_LOADING_STATUS = "order_package_loading_status";//预约签收状态

6
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionReservationEntity.java

@ -297,6 +297,10 @@ public class DistributionReservationEntity extends TenantEntity {
@ApiModelProperty(value = "备货结束时间") @ApiModelProperty(value = "备货结束时间")
private Date endTimeStocking; private Date endTimeStocking;
/**
* 是否安装
*/
@ApiModelProperty(value = "是否安装, 0-否 1- 是")
private Integer isInstall;
} }

6
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionReservationVO.java

@ -91,6 +91,12 @@ public class DistributionReservationVO extends DistributionReservationEntity {
@ApiModelProperty(value = "签收状态") @ApiModelProperty(value = "签收状态")
private String warehouseAddress; private String warehouseAddress;
/**
* 是否安装
*/
@ApiModelProperty(value = "是否安装")
private String isInstallName;
/** /**
* 仓库经度 * 仓库经度

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java

@ -335,7 +335,6 @@ public class DistributionSignforController extends BladeController {
distributionSignforDTO.setId(distributionSignfor.getId()); distributionSignforDTO.setId(distributionSignfor.getId());
distributionSignforService.updateSign(distributionSignforDTO); distributionSignforService.updateSign(distributionSignforDTO);
distributionStockupInfoService.maintenanceStockUp(distributionSignfor.getReservationId(),1); distributionStockupInfoService.maintenanceStockUp(distributionSignfor.getReservationId(),1);
} }
// return R.status(distributionSignforService.updateById(distributionSignfor)); // return R.status(distributionSignforService.updateById(distributionSignfor));
return r; return r;

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

@ -252,6 +252,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
@Autowired @Autowired
private IBasicdataDriverArteryClient arteryClient; private IBasicdataDriverArteryClient arteryClient;
@Autowired
private IDistributionDeliveryDetailsService distributionDeliveryDetailsService;
// private final IWarehouseRetentionScanClient warehouseRetentionScanClient; // private final IWarehouseRetentionScanClient warehouseRetentionScanClient;
// @Lazy // @Lazy
@ -4849,14 +4852,15 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
List<DistrilbutionBillPackageEntity> distrilbutionBillPackageEntities = distrilbutionBillPackageMapper.selectList(distrilbutionBillStockEntityLambdaQueryWrapper); List<DistrilbutionBillPackageEntity> distrilbutionBillPackageEntities = distrilbutionBillPackageMapper.selectList(distrilbutionBillStockEntityLambdaQueryWrapper);
// 得到所以的订单列表 List<DistributionParcelListEntity> distributionParcelListEntities = new ArrayList<>();
List<DistributionParcelListEntity> distributionParcelListEntities = null;
if (!distrilbutionBillPackageEntities.isEmpty()) { if (!distrilbutionBillPackageEntities.isEmpty()) {
List<Long> ids = distrilbutionBillPackageEntities.stream().map(DistrilbutionBillPackageEntity::getParceListId).collect(Collectors.toList()); List<Long> ids = distrilbutionBillPackageEntities.stream().map(DistrilbutionBillPackageEntity::getParceListId).collect(Collectors.toList());
distributionParcelListEntities = distributionParcelListMapper.selectBatchIds(ids); distributionParcelListEntities = distributionParcelListMapper.selectBatchIds(ids);
} }
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("自提单号", distrilbutionBillLadingEntity.getPickupBatch()); map.put("自提单号", distrilbutionBillLadingEntity.getPickupBatch());
String fileTypeName = QRCodeUtil.createCodeToFile(map.get("自提单号").toString()); String fileTypeName = QRCodeUtil.createCodeToFile(map.get("自提单号").toString());
@ -4864,9 +4868,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
// map.put("收货单单位", reservationEntity.getReceivingUnit());//收货单单位 // map.put("收货单单位", reservationEntity.getReceivingUnit());//收货单单位
// map.put("商场名称", reservationEntity.getStoreName());//商场名称 // map.put("商场名称", reservationEntity.getStoreName());//商场名称
// 构建map集合中收货单和商场名称 // 构建map集合中收货单和商场名称
if (!distributionParcelListEntities.isEmpty() && !distrilbutionBillStockEntities.isEmpty()){
buildMapByDistrilbutionBillLadingEntity(map, distrilbutionBillStockEntities, distributionParcelListEntities, distrilbutionBillLadingEntity); buildMapByDistrilbutionBillLadingEntity(map, distrilbutionBillStockEntities, distributionParcelListEntities, distrilbutionBillLadingEntity);
}
map.put("提货人", distrilbutionBillLadingEntity.getConsignee());//提货人 map.put("提货人", distrilbutionBillLadingEntity.getConsignee());//提货人
map.put("联系电话", distrilbutionBillLadingEntity.getConsigneePhone());//收货人电话 map.put("联系电话", distrilbutionBillLadingEntity.getConsigneePhone());//收货人电话
BasicdataWarehouseEntity entityWarehouseId = warehouseClient.getEntityWarehouseId(distrilbutionBillLadingEntity.getWarehouseId()); BasicdataWarehouseEntity entityWarehouseId = warehouseClient.getEntityWarehouseId(distrilbutionBillLadingEntity.getWarehouseId());
@ -4919,24 +4922,71 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
private void buildMapByDistrilbutionBillLadingEntity(Map<String, Object> map, List<DistrilbutionBillStockEntity> distrilbutionBillStockEntities, List<DistributionParcelListEntity> distributionParcelListEntities, DistrilbutionBillLadingEntity distrilbutionBillLadingEntity) { private void buildMapByDistrilbutionBillLadingEntity(Map<String, Object> map, List<DistrilbutionBillStockEntity> distrilbutionBillStockEntities, List<DistributionParcelListEntity> distributionParcelListEntities, DistrilbutionBillLadingEntity distrilbutionBillLadingEntity) {
// 查询订单集合 // 查询订单集合
Set<Long> ids = new HashSet<Long>(); int a = 1;
for (DistrilbutionBillStockEntity distrilbutionBillStockEntity : distrilbutionBillStockEntities) { List<Map<String, Object>> ls = new ArrayList<>();
ids.add(distrilbutionBillStockEntity.getStockArticleId());
}
// 得到所以的订单列表
List<DistributionStockArticleEntity> distributionStockArticleEntities = distributionStockArticleMapper.selectBatchIds(ids);
// 获取订单中的商城和收货单位 // 获取订单中的商城和收货单位
StringBuilder consigneeUnit = new StringBuilder(); StringBuilder consigneeUnit = new StringBuilder();
StringBuilder mailNames = new StringBuilder(); StringBuilder mailNames = new StringBuilder();
List<Map<String, Object>> ls = new ArrayList<>(); int hejiNum = 0;
Map<String, Object> m = new HashMap<>();
// 查询库存品信息
List<DistributionDeliveryDetailsEntity> detailsEntities = distributionDeliveryDetailsService.list(Wrappers.<DistributionDeliveryDetailsEntity>query().lambda()
.eq(DistributionDeliveryDetailsEntity::getBillLadingId, distrilbutionBillLadingEntity.getId())
.ne(DistributionDeliveryDetailsEntity::getStockStatus, ReservationOrderStatusConstant.quxiao.getValue())
);
if (!detailsEntities.isEmpty()) {
Map<Long, List<DistributionDeliveryDetailsEntity>> inventoryMap = detailsEntities.stream().collect(Collectors.groupingBy(DistributionDeliveryDetailsEntity::getStockListId));
List<Long> inventoryIds = detailsEntities.stream().map(DistributionDeliveryDetailsEntity::getStockListId).collect(Collectors.toList());
List<DistributionStockListEntity> distributionStockListEntities = distributionStockListService.listByIds(inventoryIds);
if (!distributionStockListEntities.isEmpty()) {
for (DistributionStockListEntity distributionStockListEntity : distributionStockListEntities) {
Map<String, Object> tempMap = new HashMap<>();
tempMap.put("序号", a);
tempMap.put("运单号", distributionStockListEntity.getIncomingBatch());
tempMap.put("合同号", distributionStockListEntity.getOrderCode());
tempMap.put("物料名称", distributionStockListEntity.getDescriptionGoods());
//构建产品明细
Map<String,Object> map1 = new HashMap<>();
map1.put("物料编码",distributionStockListEntity.getCargoNumber());
map1.put("物料单位",distributionStockListEntity.getCargoUnit());
map1.put("物料规格",distributionStockListEntity.getCargoNorms());
//查询此订制品库位信息
DistributionDeliveryDetailsEntity distributionDeliveryDetailsEntity = inventoryMap.get(distributionStockListEntity.getId()).get(0);
Integer quantity = distributionDeliveryDetailsEntity.getQuantity();
map1.put("计划数量",quantity);
hejiNum += quantity;
tempMap.put("小计", quantity);
tempMap.put("货位", "");
tempMap.put("产品明细", map1);
tempMap.put("备货区", "");
ls.add(tempMap);
a++;
if (!mailNames.toString().contains(distributionStockListEntity.getMarketName())) {
if (!mailNames.toString().isEmpty()) {
mailNames.append(",");
}
mailNames.append(distributionStockListEntity.getMarketName());
}
if (!consigneeUnit.toString().contains(distributionStockListEntity.getMarketName())) {
if (!consigneeUnit.toString().isEmpty()) {
consigneeUnit.append(",");
}
consigneeUnit.append(distributionStockListEntity.getMarketName());
}
}
}
}
int a = 1;
// 构建产品明细的表头 -- 这里目前只处理了定制品和有数据的库存品,对于零担 还没有处理 // 构建产品明细的表头 -- 这里目前只处理了定制品和有数据的库存品,对于零担 还没有处理
List<Map<String, Object>> listMapTemp = new ArrayList<>(); List<Map<String, Object>> listMapTemp = new ArrayList<>();
Map<String, Object> m = new HashMap<>();
int hejiNum = 0;
for (DistributionParcelListEntity distributionParcelListEntity : distributionParcelListEntities) { for (DistributionParcelListEntity distributionParcelListEntity : distributionParcelListEntities) {
if (StringUtils.isBlank(distributionParcelListEntity.getThirdProduct())) { if (StringUtils.isBlank(distributionParcelListEntity.getThirdProduct())) {
distributionParcelListEntity.setThirdProduct("其它"); distributionParcelListEntity.setThirdProduct("其它");
@ -4952,98 +5002,111 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
// 加入到集合中的去 目的是为了获取分类头部 // 加入到集合中的去 目的是为了获取分类头部
listMapTemp.add(m); listMapTemp.add(m);
if (!distrilbutionBillStockEntities.isEmpty()) {
List<Long> ids = distrilbutionBillStockEntities.stream().map(DistrilbutionBillStockEntity::getStockArticleId).collect(Collectors.toList());
// 得到所以的订单列表
List<DistributionStockArticleEntity> distributionStockArticleEntities = distributionStockArticleMapper.selectBatchIds(ids);
for (DistributionStockArticleEntity distributionStockArticleEntity : distributionStockArticleEntities) {
Map<String, Object> tempMap = new HashMap<>();
// 需要从所有的包件的
List<DistributionParcelListEntity> ts = new ArrayList<>();
for (DistributionParcelListEntity distributionParcelListEntity : distributionParcelListEntities) {
if (distributionParcelListEntity.getStockArticleId().equals(distributionStockArticleEntity.getId())) {
ts.add(distributionParcelListEntity);
}
}
for (DistributionStockArticleEntity distributionStockArticleEntity : distributionStockArticleEntities) { if (!mailNames.toString().contains(distributionStockArticleEntity.getMallName())) {
if (!mailNames.toString().isEmpty()) {
// 需要从所有的包件的 mailNames.append(",");
List<DistributionParcelListEntity> ts = new ArrayList<>(); }
for (DistributionParcelListEntity distributionParcelListEntity : distributionParcelListEntities) { mailNames.append(distributionStockArticleEntity.getMallName());
if (distributionParcelListEntity.getStockArticleId().equals(distributionStockArticleEntity.getId())) { }
ts.add(distributionParcelListEntity); if (!consigneeUnit.toString().contains(distributionStockArticleEntity.getConsigneeUnit())) {
} if (!consigneeUnit.toString().isEmpty()) {
} consigneeUnit.append(",");
}
consigneeUnit.append(distributionStockArticleEntity.getConsigneeUnit());
}
if (!mailNames.toString().contains(distributionStockArticleEntity.getMallName())) {
if (!mailNames.toString().isEmpty()) {
mailNames.append(",");
}
mailNames.append(distributionStockArticleEntity.getMallName());
}
if (!consigneeUnit.toString().contains(distributionStockArticleEntity.getConsigneeUnit())) {
if (!consigneeUnit.toString().isEmpty()) {
consigneeUnit.append(",");
}
consigneeUnit.append(distributionStockArticleEntity.getConsigneeUnit());
}
Map<String, Object> tempMap = new HashMap<>(); tempMap.put("序号", a);
tempMap.put("运单号", distributionStockArticleEntity.getWaybillNumber());
tempMap.put("合同号", distributionStockArticleEntity.getOrderCode());
String materialNameStr = buildMaterialNameStr(distributionParcelListEntities);
tempMap.put("物料名称", materialNameStr);
tempMap.put("序号", a);
tempMap.put("运单号", distributionStockArticleEntity.getWaybillNumber());
tempMap.put("合同号", distributionStockArticleEntity.getOrderCode());
String materialNameStr = buildMaterialNameStr(distributionParcelListEntities);
tempMap.put("物料名称", materialNameStr);
// 构建产品明细 --对于每一个订单
buildProductDetail(tempMap, m, ts);
// 构建产品明细 --对于每一个订单 Map<String, Object> os = (Map<String, Object>) tempMap.get("产品明细");
buildProductDetail(tempMap, m, ts);
Map<String, Object> os = (Map<String, Object>) tempMap.get("产品明细"); Set<String> strings = os.keySet();
int sumNum = 0;
for (String string : strings) {
Object o = os.get(string);
sumNum += (o != null) ? (int) o : 0;
}
tempMap.put("小计", sumNum);
hejiNum += sumNum;
// 查询货物货位
Set<String> strings = os.keySet(); //通过订单id和预约id查询对应包件的库位信息
int sumNum = 0; List<String> orderPackageCodes = ts.stream()
for (String string : strings) { .map(DistributionParcelListEntity::getOrderPackageCode) // 获取每个对象的orderPackageCode
Object o = os.get(string); .collect(Collectors.toList());
sumNum += (o != null) ? (int) o : 0;
}
tempMap.put("小计", sumNum);
hejiNum += sumNum;
// 查询货物货位
//通过订单id和预约id查询对应包件的库位信息
List<String> orderPackageCodes = ts.stream()
.map(DistributionParcelListEntity::getOrderPackageCode) // 获取每个对象的orderPackageCode
.collect(Collectors.toList());
List<Long> orderPackageIds = ts.stream()
.map(DistributionParcelListEntity::getId) // 获取每个对象的包件ID
.collect(Collectors.toList());
if (Func.isNotEmpty(orderPackageCodes)) {
List<String> allocationStrList = distributionParcelListMapper.selectAllocationInforByOrderPackageCode(orderPackageCodes, distrilbutionBillLadingEntity.getWarehouseId());
String allocationStr = StringUtils.join(allocationStrList, ",");
tempMap.put("货位", allocationStr);
}
List<Long> orderPackageIds = ts.stream() //通过订单id和预约id查询对应包件的备货区信息
.map(DistributionParcelListEntity::getId) // 获取每个对象的包件ID LambdaQueryWrapper<DistributionStockEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
.collect(Collectors.toList()); lambdaQueryWrapper.eq(DistributionStockEntity::getBillLadingId, distrilbutionBillLadingEntity.getId())
if (Func.isNotEmpty(orderPackageCodes)) { .in(DistributionStockEntity::getParcelListId, orderPackageIds);
List<String> allocationStrList = distributionParcelListMapper.selectAllocationInforByOrderPackageCode(orderPackageCodes, distrilbutionBillLadingEntity.getWarehouseId()); List<DistributionStockEntity> distributionStockEntities = distributionStockMapper.selectList(lambdaQueryWrapper);
String allocationStr = StringUtils.join(allocationStrList, ",");
tempMap.put("货位", allocationStr);
}
//通过订单id和预约id查询对应包件的备货区信息 Set<String> stockupAreaStrList = distributionStockEntities.stream().map(DistributionStockEntity::getStockupArea).collect(Collectors.toSet());
LambdaQueryWrapper<DistributionStockEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(DistributionStockEntity::getBillLadingId, distrilbutionBillLadingEntity.getId())
.in(DistributionStockEntity::getParcelListId, orderPackageIds);
List<DistributionStockEntity> distributionStockEntities = distributionStockMapper.selectList(lambdaQueryWrapper);
Set<String> stockupAreaStrList = distributionStockEntities.stream().map(DistributionStockEntity::getStockupArea).collect(Collectors.toSet()); String stockupAreaStr = StringUtils.join(stockupAreaStrList, ",");
tempMap.put("备货区", stockupAreaStr);
String stockupAreaStr = StringUtils.join(stockupAreaStrList, ",");
tempMap.put("备货区", stockupAreaStr);
ls.add(tempMap);
a++;
ls.add(tempMap); }
a++;
} }
map.put("收货单单位", consigneeUnit.toString()); map.put("收货单单位", consigneeUnit.toString());
map.put("商场名称", mailNames.toString()); map.put("商场名称", mailNames.toString());
map.put("明细", ls); map.put("明细", ls);
Map<String, Object> m1 = new HashMap<>(); Map<String, Object> m1 = new HashMap<>();
m1.put("产品明细", m); if (!m.isEmpty()) {
m1.put("产品明细", m);
}
m1.put("合计数量", hejiNum); m1.put("合计数量", hejiNum);
map.put("合计", m1); map.put("合计", m1);
} }
/** /**
* 构建分类明细 * 构建分类明细
* *

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

@ -1985,6 +1985,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
reservationEntity.setReplaceFee(distributionReservationDTO.getReplaceFee()); reservationEntity.setReplaceFee(distributionReservationDTO.getReplaceFee());
reservationEntity.setRemarks(distributionReservationDTO.getRemarks()); reservationEntity.setRemarks(distributionReservationDTO.getRemarks());
reservationEntity.setIsUrgent(distributionReservationDTO.getIsUrgent()); reservationEntity.setIsUrgent(distributionReservationDTO.getIsUrgent());
reservationEntity.setIsInstall(distributionReservationDTO.getIsInstall());
this.updateById(reservationEntity); this.updateById(reservationEntity);
return R.status(true); return R.status(true);
} }

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

@ -5196,14 +5196,10 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
jsonObjects.add(jsonObject); jsonObjects.add(jsonObject);
content = "包件在"+myCurrentWarehouse.getName()+"由"+loadscanEntity.getSigningUser()+"司机司机批量签收,装车方式:扫描装车,配送车次号:"+distributionDeliveryListEntity.getTrainNumber()+"预约任务号:"+reservationEntity.getReservationCode(); content = "包件在"+myCurrentWarehouse.getName()+"由"+loadscanEntity.getSigningUser()+"司机司机批量签收,装车方式:扫描装车,配送车次号:"+distributionDeliveryListEntity.getTrainNumber()+"预约任务号:"+reservationEntity.getReservationCode();
trunklinePackageTrackLog= handleLogJSONObject(myCurrentWarehouse,AuthUtil.getUser(),parcelListEntity.getOrderPackageCode(),content,WorkNodeEnums.DISTRIBUTION_ABNORMAL_SIGN_FOR.getCode(), distributionDeliveryListEntity.getTrainNumber(), parcelListEntity.getWarehouseEntryTimeEnd()); trunklinePackageTrackLog= handleLogJSONObject(myCurrentWarehouse,AuthUtil.getUser(),parcelListEntity.getOrderPackageCode(),content,WorkNodeEnums.DISTRIBUTION_ABNORMAL_SIGN_FOR.getCode(), distributionDeliveryListEntity.getTrainNumber(), parcelListEntity.getWarehouseEntryTimeEnd());
distributionAsyncService.sendFactory(parcelListEntity, loadscanEntity.getSigningTime(),reservationEntity.getId(),reservationEntity.getReservationCode(),myCurrentWarehouse.getName(),user.getNickName());
} else { } else {
//存在装车数据 loadscanEntities.setMsg("司机一键签收数据补录");
if (distributionSignfor.getIsClerk()) {
loadscanEntities.setMsg("文员一键签收数据补录");
} else {
loadscanEntities.setMsg("司机一键签收数据补录");
}
if (!loadscanEntities.getSignforState().equals(LoadScanSigningStatusConstant.yiqianshou.getValue())) { if (!loadscanEntities.getSignforState().equals(LoadScanSigningStatusConstant.yiqianshou.getValue())) {
//已经进行过装车 这里不需要进行订制品订单在库数量扣减 //已经进行过装车 这里不需要进行订制品订单在库数量扣减
loadscanEntities.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue()); loadscanEntities.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue());
@ -5218,7 +5214,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
packageLockIds.add(loadscanEntities.getPackageId()); packageLockIds.add(loadscanEntities.getPackageId());
content = "包件在"+myCurrentWarehouse.getName()+"由"+loadscanEntities.getSigningUser()+"司机批量签收,装车方式:补录装车,配送车次号:"+distributionDeliveryListEntity.getTrainNumber()+"预约任务号:"+reservationEntity.getReservationCode(); content = "包件在"+myCurrentWarehouse.getName()+"由"+loadscanEntities.getSigningUser()+"司机批量签收,装车方式:补录装车,配送车次号:"+distributionDeliveryListEntity.getTrainNumber()+"预约任务号:"+reservationEntity.getReservationCode();
trunklinePackageTrackLog= handleLogJSONObject(myCurrentWarehouse,AuthUtil.getUser(),parcelListEntity.getOrderPackageCode(),content,WorkNodeEnums.DISTRIBUTION_ABNORMAL_SIGN_FOR.getCode(),distributionDeliveryListEntity.getTrainNumber(), parcelListEntity.getWarehouseEntryTimeEnd()); trunklinePackageTrackLog= handleLogJSONObject(myCurrentWarehouse,AuthUtil.getUser(),parcelListEntity.getOrderPackageCode(),content,WorkNodeEnums.DISTRIBUTION_ABNORMAL_SIGN_FOR.getCode(),distributionDeliveryListEntity.getTrainNumber(), parcelListEntity.getWarehouseEntryTimeEnd());
//推送扫描记录
distributionAsyncService.sendFactory(parcelListEntity, loadscanEntities.getSigningTime(),reservationEntity.getId(),reservationEntity.getReservationCode(),myCurrentWarehouse.getName(),user.getNickName());
} }
} }
@ -5234,7 +5231,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (Func.isNotEmpty(packageIds)) { if (Func.isNotEmpty(packageIds)) {
distributionAsyncService.handlPakcage(packageIds, myCurrentWarehouse.getId()); distributionAsyncService.handlPakcage(packageIds, myCurrentWarehouse.getId());
//批量推送 //批量推送
distributionAsyncService.sendReviewFactory(distributionSignforEntity.getId(), myCurrentWarehouse.getName(), myCurrentWarehouse.getId()); // distributionAsyncService.sendReviewFactory(distributionSignforEntity.getId(), myCurrentWarehouse.getName(), myCurrentWarehouse.getId());
} }
//备货库位下架 //备货库位下架
//TODO //TODO

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/wrapper/DistributionReservationWrapper.java

@ -51,6 +51,7 @@ public class DistributionReservationWrapper extends BaseEntityWrapper<Distributi
reservationVO.setStockupStatusName(DictBizCache.getValue(DictBizConstant.RESERVATION_STOCKUP_STATUS,entity.getStockupStatus())); reservationVO.setStockupStatusName(DictBizCache.getValue(DictBizConstant.RESERVATION_STOCKUP_STATUS,entity.getStockupStatus()));
reservationVO.setLoadingStatusName(DictBizCache.getValue(DictBizConstant.RESERVATION_LIST_LOADING_STATUS,entity.getLoadingStatus())); reservationVO.setLoadingStatusName(DictBizCache.getValue(DictBizConstant.RESERVATION_LIST_LOADING_STATUS,entity.getLoadingStatus()));
reservationVO.setSigningStatusName(DictBizCache.getValue(DictBizConstant.RESERVATION_SIGNFOR_STATUS,entity.getSigningStatus())); reservationVO.setSigningStatusName(DictBizCache.getValue(DictBizConstant.RESERVATION_SIGNFOR_STATUS,entity.getSigningStatus()));
reservationVO.setIsInstallName(DictBizCache.getValue(DictBizConstant.YES_NO,entity.getIsInstall()));
return reservationVO; return reservationVO;
} }
} }

3
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/TrayScanDesServiceImpl.java

@ -53,7 +53,8 @@ public class TrayScanDesServiceImpl implements ITrayScanDesService {
QueryWrapper<TrayScanDesEntity> queryWrapper = new QueryWrapper<>(); QueryWrapper<TrayScanDesEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("now_warehouse_id",oldWarehouseId) queryWrapper.eq("now_warehouse_id",oldWarehouseId)
.eq("type",1) .eq("type",1)
.eq("tray_id",trayId); .eq("tray_id",trayId)
.eq("delete_time",0);
return trayScanDesMapper.selectList(queryWrapper); return trayScanDesMapper.selectList(queryWrapper);
} }
} }

36
blade-service/logpm-report/src/main/java/com/logpm/report/controller/WarehouseIndexController.java

@ -7,6 +7,7 @@ import com.logpm.report.dto.IndexDTO;
import com.logpm.report.service.IWarehouseIndexService; import com.logpm.report.service.IWarehouseIndexService;
import com.logpm.report.vo.*; import com.logpm.report.vo.*;
import com.logpm.report.vo.indexCount.IndexDeliveryDataVO; import com.logpm.report.vo.indexCount.IndexDeliveryDataVO;
import com.logpm.report.vo.indexCount.IndexSignforDataVO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
@ -307,4 +308,39 @@ public class WarehouseIndexController {
} }
@ResponseBody
@PostMapping("/signforData")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "卸车异常数据", notes = "传入indexDTO")
public R signforData(@RequestBody IndexDTO indexDTO) {
String method = "###########unloadAbnormalData: ";
log.info(method+"indexDTO={}",indexDTO);
try{
List<Long> warehouseIds = new ArrayList<>();
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
List<BasicdataWarehouseEntity> myWatchWarehouse = warehouseClient.getMyWarehouseList();
if (myWatchWarehouse.isEmpty()) {
warehouseIds = myWatchWarehouse.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList());
}
}else{
warehouseIds.add(myCurrentWarehouse.getId());
}
indexDTO.setWarehouseIds(warehouseIds);
//查询订制品打托列表
List<IndexSignforDataVO> indexDeliveryDataVO = warehouseIndexService.signforData(indexDTO);
return R.data(indexDeliveryDataVO);
}catch (CustomerException e){
log.warn(e.message);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常,联系管理员",e);
return R.fail(500,"系统异常,联系管理员");
}
}
} }

1
blade-service/logpm-report/src/main/java/com/logpm/report/dto/IndexDTO.java

@ -12,5 +12,6 @@ public class IndexDTO implements Serializable {
private List<Long> warehouseIds; private List<Long> warehouseIds;
private Date startDate; private Date startDate;
private Date endDate; private Date endDate;
private String dayStr;
} }

48
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.java

@ -138,4 +138,52 @@ public interface WarehouseIndexMapper {
*/ */
BigDecimal findTripartiteTotalVolume(@Param("param")IndexDTO indexDTO); BigDecimal findTripartiteTotalVolume(@Param("param")IndexDTO indexDTO);
/**
* 查询当天的签收数量
* @param indexDTO
* @return
*/
Integer findSignforDataByDay(@Param("param")IndexDTO indexDTO);
/**
* 查询当月签收数量
* @param indexDTO
* @return
*/
Integer findSignforDataByMonth(@Param("param")IndexDTO indexDTO);
/**
* 查询前天未签收件数
* @param indexDTO
* @return
*/
Integer findUnSignforDataByDay(@Param("param")IndexDTO indexDTO);
/**
* 查询当月未签收件数
* @param indexDTO
* @return
*/
Integer findUnSignforDataByMonth(@Param("param")IndexDTO indexDTO);
/**
* 查询当天文员复核数
* @param indexDTO
* @return
*/
Integer findClerkSignforNumByDay(@Param("param")IndexDTO indexDTO);
/**
* 查询当月文员复核数
* @param indexDTO
* @return
*/
Integer findClerkSignforNumByMonth(@Param("param")IndexDTO indexDTO);
/**
* 查询当天计划数
* @param indexDTO
* @return
*/
Integer findPlanNumByDay(@Param("param")IndexDTO indexDTO);
} }

225
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml

@ -223,7 +223,7 @@
<select id="findBillLadingTotal" resultType="com.logpm.report.vo.indexCount.IndexDeliveryDataVO"> <select id="findBillLadingTotal" resultType="com.logpm.report.vo.indexCount.IndexDeliveryDataVO">
SELECT SELECT
3 AS type, 3 AS type,
count( 1 ) count( 1 ) AS totalNum
FROM FROM
logpm_distrilbution_bill_lading logpm_distrilbution_bill_lading
<where> <where>
@ -246,7 +246,7 @@
AND is_deleted = 0 AND is_deleted = 0
AND delivery_type = #{type} AND delivery_type = #{type}
<if test="param.warehouseIds != null"> <if test="param.warehouseIds != null">
AND warehouse IN AND warehouse_id IN
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")"> <foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
@ -268,7 +268,7 @@
AND ldrp.packet_bar_status != 2 AND ldrp.packet_bar_status != 2
AND ldr.delivery_type = #{type} AND ldr.delivery_type = #{type}
<if test="param.warehouseIds != null"> <if test="param.warehouseIds != null">
AND ldr.warehouse IN AND ldr.warehouse_id IN
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")"> <foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
@ -289,7 +289,7 @@
AND ldrp.packet_bar_status != 2 AND ldrp.packet_bar_status != 2
AND ldr.delivery_type = #{type} AND ldr.delivery_type = #{type}
<if test="param.warehouseIds != null"> <if test="param.warehouseIds != null">
AND ldr.warehouse IN AND ldr.warehouse_id IN
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")"> <foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
@ -311,7 +311,7 @@
AND ldl.is_deleted = 0 AND ldl.is_deleted = 0
AND ldr.delivery_type = #{type} AND ldr.delivery_type = #{type}
<if test="param.warehouseIds != null"> <if test="param.warehouseIds != null">
AND ldr.warehouse IN AND ldr.warehouse_id IN
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")"> <foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
@ -329,7 +329,7 @@
AND ldbp.is_deleted = 0 AND ldbp.is_deleted = 0
AND ldbl.is_deleted = 0 AND ldbl.is_deleted = 0
<if test="param.warehouseIds != null"> <if test="param.warehouseIds != null">
AND ldbl.warehouse IN AND ldbl.warehouse_id IN
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")"> <foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
@ -348,7 +348,7 @@
AND ldbp.is_deleted = 0 AND ldbp.is_deleted = 0
AND ldbl.is_deleted = 0 AND ldbl.is_deleted = 0
<if test="param.warehouseIds != null"> <if test="param.warehouseIds != null">
AND ldbl.warehouse IN AND ldbl.warehouse_id IN
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")"> <foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
@ -367,7 +367,7 @@
AND ldbp.is_deleted = 0 AND ldbp.is_deleted = 0
AND ldbl.is_deleted = 0 AND ldbl.is_deleted = 0
<if test="param.warehouseIds != null"> <if test="param.warehouseIds != null">
AND ldbl.warehouse IN AND ldbl.warehouse_id IN
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")"> <foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
@ -454,5 +454,214 @@
</if> </if>
</where> </where>
</select> </select>
<select id="findSignforDataByDay" resultType="java.lang.Integer">
SELECT
((
SELECT
IFNULL( SUM( received_quantity ), 0 )
FROM
logpm_distribution_loadscan
<where>
signfor_state = 2
AND DATE_FORMAT( signing_time, "%y%m%d" ) = DATE_FORMAT( #{param.dayStr}, "%y%m%d" )
AND is_deleted = 0
<if test="param.warehouseIds != null">
and warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
) + (
SELECT
IFNULL( SUM( quantity ), 0 )
FROM
logpm_distribution_bill_lading_scan
<where>
material_type = 2
AND DATE_FORMAT( create_time, "%y%m%d" ) = DATE_FORMAT( #{param.dayStr}, "%y%m%d" )
AND is_deleted = 0
<if test="param.warehouseIds != null">
and warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
)) AS num
</select>
<select id="findSignforDataByMonth" resultType="java.lang.Integer">
SELECT
((
SELECT
IFNULL( SUM( received_quantity ), 0 )
FROM
logpm_distribution_loadscan
<where>
signfor_state = 2
AND DATE_FORMAT( signing_time, "%y%m" ) = DATE_FORMAT( #{param.dayStr}, "%y%m" )
AND is_deleted = 0
<if test="param.warehouseIds != null">
and warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
) + (
SELECT
IFNULL( SUM( quantity ), 0 )
FROM
logpm_distribution_bill_lading_scan
<where>
material_type = 2
AND DATE_FORMAT( create_time, "%y%m" ) = DATE_FORMAT( #{param.dayStr}, "%y%m" )
AND is_deleted = 0
<if test="param.warehouseIds != null">
and warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
)) AS num
</select>
<select id="findUnSignforDataByDay" resultType="java.lang.Integer">
SELECT
((
SELECT
IFNULL( sum( quantity ), 0 )
FROM
logpm_distribution_reservation_package AS ldrp
LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldrp.parce_list_id = ldpl.id
<where>
ldpl.order_package_status != 70
AND ldrp.packet_bar_status != 2
AND ldrp.is_deleted = 0
AND DATE_FORMAT( ldrp.create_time, "%y%m%d" ) = DATE_FORMAT( #{param.dayStr}, "%y%m%d" )
<if test="param.warehouseIds != null">
AND ldpl.warehouse_id IN
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
) + (
SELECT
IFNULL( sum( quantity ), 0 )
FROM
logpm_distrilbution_bill_package AS ldbp
LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldbp.parce_list_id = ldpl.id
<where>
ldpl.order_package_status != 70
AND ldbp.packet_bar_status != 2
AND ldbp.is_deleted = 0
AND DATE_FORMAT( ldbp.create_time, "%y%m%d" ) = DATE_FORMAT( #{param.dayStr}, "%y%m%d" )
<if test="param.warehouseIds != null">
AND ldpl.warehouse_id IN
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
))
</select>
<select id="findUnSignforDataByMonth" resultType="java.lang.Integer">
SELECT
((
SELECT
IFNULL( sum( quantity ), 0 )
FROM
logpm_distribution_reservation_package AS ldrp
LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldrp.parce_list_id = ldpl.id
<where>
ldpl.order_package_status != 70
AND ldrp.packet_bar_status != 2
AND ldrp.is_deleted = 0
AND DATE_FORMAT( ldrp.create_time, "%y%m" ) = DATE_FORMAT( #{param.dayStr}, "%y%m" )
<if test="param.warehouseIds != null">
AND ldpl.warehouse_id IN
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
) + (
SELECT
IFNULL( sum( quantity ), 0 )
FROM
logpm_distrilbution_bill_package AS ldbp
LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldbp.parce_list_id = ldpl.id
<where>
ldpl.order_package_status != 70
AND ldbp.packet_bar_status != 2
AND ldbp.is_deleted = 0
AND DATE_FORMAT( ldbp.create_time, "%y%m" ) = DATE_FORMAT( #{param.dayStr}, "%y%m" )
<if test="param.warehouseIds != null">
AND ldpl.warehouse_id IN
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
))
</select>
<select id="findClerkSignforNumByDay" resultType="java.lang.Integer">
SELECT
count( 1 )
FROM
logpm_distribution_reservation AS ldr
LEFT JOIN logpm_distribution_signfor AS lds ON lds.reservation_id = ldr.id
<where>
ldr.reservation_status != 40
AND ldr.is_deleted = 0
AND lds.is_deleted = 0
AND lds.signing_status = 2
AND DATE_FORMAT(lds.signing_time, "%y%m%d" ) = DATE_FORMAT( #{param.dayStr}, "%y%m%d" )
<if test="param.warehouseIds != null">
AND ldr.warehouse_id IN
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<select id="findClerkSignforNumByMonth" resultType="java.lang.Integer">
SELECT
count( 1 )
FROM
logpm_distribution_reservation AS ldr
LEFT JOIN logpm_distribution_signfor AS lds ON lds.reservation_id = ldr.id
<where>
ldr.reservation_status != 40
AND ldr.is_deleted = 0
AND lds.is_deleted = 0
AND lds.signing_status = 2
AND DATE_FORMAT(lds.signing_time, "%y%m%d" ) = DATE_FORMAT( #{param.dayStr}, "%y%m%d" )
<if test="param.warehouseIds != null">
AND ldr.warehouse_id IN
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<select id="findPlanNumByDay" resultType="java.lang.Integer">
SELECT
count( 1 )
FROM
logpm_distribution_reservation
<where>
reservation_status != 40
AND is_deleted = 0
<if test="param.warehouseIds != null">
AND warehouse_id IN
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
</mapper> </mapper>

8
blade-service/logpm-report/src/main/java/com/logpm/report/service/IWarehouseIndexService.java

@ -3,6 +3,7 @@ package com.logpm.report.service;
import com.logpm.report.dto.IndexDTO; import com.logpm.report.dto.IndexDTO;
import com.logpm.report.vo.*; import com.logpm.report.vo.*;
import com.logpm.report.vo.indexCount.IndexDeliveryDataVO; import com.logpm.report.vo.indexCount.IndexDeliveryDataVO;
import com.logpm.report.vo.indexCount.IndexSignforDataVO;
import java.util.List; import java.util.List;
@ -27,4 +28,11 @@ public interface IWarehouseIndexService {
* @return * @return
*/ */
List<IndexDeliveryDataVO> deliveryData(IndexDTO indexDTO); List<IndexDeliveryDataVO> deliveryData(IndexDTO indexDTO);
/**
* 查询当前签收率
* @param indexDTO
* @return
*/
List<IndexSignforDataVO> signforData(IndexDTO indexDTO);
} }

61
blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java

@ -6,6 +6,7 @@ import com.logpm.report.mapper.WarehouseIndexMapper;
import com.logpm.report.service.IWarehouseIndexService; import com.logpm.report.service.IWarehouseIndexService;
import com.logpm.report.vo.*; import com.logpm.report.vo.*;
import com.logpm.report.vo.indexCount.IndexDeliveryDataVO; import com.logpm.report.vo.indexCount.IndexDeliveryDataVO;
import com.logpm.report.vo.indexCount.IndexSignforDataVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.DistributionTypeConstant; import org.springblade.common.constant.DistributionTypeConstant;
@ -14,6 +15,7 @@ import org.springblade.core.tool.utils.Func;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
@Slf4j @Slf4j
@ -278,18 +280,61 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
//查询外协信息 //查询外协信息
IndexDeliveryDataVO indexTripartiteDeliveryDataVO = warehouseIndexMapper.findTripartiteTotal(indexDTO); IndexDeliveryDataVO indexTripartiteDeliveryDataVO = warehouseIndexMapper.findTripartiteTotal(indexDTO);
if (Func.isNotEmpty(indexTripartiteDeliveryDataVO)) { if (Func.isNotEmpty(indexTripartiteDeliveryDataVO)) {
//查询自提总件数 //查询外协总件数
Integer tripartiteTotalNum = warehouseIndexMapper.findTripartiteTotalNum(indexDTO); Integer tripartiteTotalNum = warehouseIndexMapper.findTripartiteTotalNum(indexDTO);
indexDeliveryDataVO.setTotalDeliveryNum(tripartiteTotalNum); indexTripartiteDeliveryDataVO.setTotalDeliveryNum(tripartiteTotalNum);
//查询总重量 //查询外协总重量
BigDecimal tripartiteTotalWeight = warehouseIndexMapper.findTripartiteTotalWeight(indexDTO); BigDecimal tripartiteTotalWeight = warehouseIndexMapper.findTripartiteTotalWeight(indexDTO);
indexDeliveryDataVO.setTotalWeight(tripartiteTotalWeight); indexTripartiteDeliveryDataVO.setTotalWeight(tripartiteTotalWeight);
//查询总包件体积 //查询外协总包件体积
BigDecimal tripartiteTotalVolume = warehouseIndexMapper.findTripartiteTotalVolume(indexDTO); BigDecimal tripartiteTotalVolume = warehouseIndexMapper.findTripartiteTotalVolume(indexDTO);
indexDeliveryDataVO.setTotalVolume(tripartiteTotalVolume); indexTripartiteDeliveryDataVO.setTotalVolume(tripartiteTotalVolume);
indexDeliveryDataVOList.add(indexDeliveryDataVO); indexDeliveryDataVOList.add(indexTripartiteDeliveryDataVO);
} }
return indexDeliveryDataVOList; return indexDeliveryDataVOList;
} }
@Override
public List<IndexSignforDataVO> signforData(IndexDTO indexDTO) {
List<IndexSignforDataVO> list = new ArrayList<>();
Date date = new Date();
SimpleDateFormat dayFormat = new SimpleDateFormat("yyyy-MM-dd");
String day = dayFormat.format(date);
indexDTO.setDayStr(day);
IndexSignforDataVO indexSignforDayDataVO = new IndexSignforDataVO();
indexSignforDayDataVO.setType(1);
//查询当天签收数据
Integer daySignforNum = warehouseIndexMapper.findSignforDataByDay(indexDTO);
indexSignforDayDataVO.setSignNum(daySignforNum);
//查询当天未签收件数
Integer dayUnSignforNum = warehouseIndexMapper.findUnSignforDataByDay(indexDTO);
indexSignforDayDataVO.setUnSignNum(dayUnSignforNum);
//计算签收率
Double daySignforScale = (double) (daySignforNum / (daySignforNum + dayUnSignforNum) * 100);
indexSignforDayDataVO.setSignScale(daySignforScale);
//查询当天文员复核数
Integer dayClerkSignforNum = warehouseIndexMapper.findClerkSignforNumByDay(indexDTO);
//查询当天计划数
Integer planByday = warehouseIndexMapper.findPlanNumByDay(indexDTO);
//计算文员签收率
indexSignforDayDataVO.setClerkSignNum(dayClerkSignforNum);
list.add(indexSignforDayDataVO);
IndexSignforDataVO indexSignforMonthDataVO = new IndexSignforDataVO();
indexSignforMonthDataVO.setType(2);
//查询当月签收数据
Integer monthSignforNum = warehouseIndexMapper.findSignforDataByMonth(indexDTO);
indexSignforMonthDataVO.setSignNum(monthSignforNum);
//查询当月未签收数据
Integer monthUnSignforNum = warehouseIndexMapper.findUnSignforDataByMonth(indexDTO);
indexSignforMonthDataVO.setUnSignNum(monthUnSignforNum);
//计算签收率
Double monthSignforScale = (double) (monthSignforNum / (monthUnSignforNum + monthSignforNum) * 100);
indexSignforMonthDataVO.setSignScale(monthSignforScale);
//查询当月文员复核数
Integer monthClerkSignforNum = warehouseIndexMapper.findClerkSignforNumByMonth(indexDTO);
indexSignforMonthDataVO.setClerkSignNum(monthClerkSignforNum);
return list;
}
} }

4
blade-service/logpm-report/src/main/java/com/logpm/report/vo/indexCount/IndexDeliveryDataVO.java

@ -11,8 +11,8 @@ public class IndexDeliveryDataVO implements Serializable {
private String type ; private String type ;
private Integer totalNum = 0; private Integer totalNum = 0;
private Integer totalDeliveryNum = 0; private Integer totalDeliveryNum = 0;
private BigDecimal totalWeight ; private BigDecimal totalWeight = BigDecimal.ZERO;
private BigDecimal totalVolume ; private BigDecimal totalVolume = BigDecimal.ZERO;
private Integer totalRoadNum = 0; private Integer totalRoadNum = 0;

27
blade-service/logpm-report/src/main/java/com/logpm/report/vo/indexCount/IndexSignforDataVO.java

@ -0,0 +1,27 @@
package com.logpm.report.vo.indexCount;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
@Data
public class IndexSignforDataVO implements Serializable {
private Integer type;
private Integer signNum;
private Integer UnSignNum;
private Double signScale;
private Integer clerkSignNum;
}

15
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml

@ -494,15 +494,18 @@
select ltco.id carsOrderId, select ltco.id carsOrderId,
ltco.waybill_no waybillNo, ltco.waybill_no waybillNo,
ltco.order_code orderCode, ltco.order_code orderCode,
lww.create_time createTime,
lww.destination destination,
lww.destination_warehouse_name destinationWarehouseName,
lww.shipper shipper,
lww.consignee consignee,
lww.goods_name goodsName,
ltco.plan_num planNum, ltco.plan_num planNum,
ltco.real_num realNum, ltco.real_num realNum,
ltco.type type, ltco.type type,
ldsa.mall_name consignee, lww.total_freight freight,
ldsa.consignee_person consigneeName, lww.remark remark,
ldsa.consignee_mobile consigneeMobile, lww.total_freight/lww.total_count*ltco.real_num price
ldsa.consignee_address consigneeAddress,
lww.departure_warehouse_name departureWarehouseName,
lww.destination_warehouse_name destinationWarehouseName
from logpm_trunkline_cars_order ltco from logpm_trunkline_cars_order ltco
left join logpm_distribution_stock_article ldsa on ldsa.order_code = ltco.order_code left join logpm_distribution_stock_article ldsa on ldsa.order_code = ltco.order_code
left join logpm_warehouse_waybill lww on lww.waybill_no = ltco.waybill_no left join logpm_warehouse_waybill lww on lww.waybill_no = ltco.waybill_no

3
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml

@ -398,7 +398,6 @@
left join logpm_warehouse_waybill lww on ltcls.waybill_no = lww.waybill_no left join logpm_warehouse_waybill lww on ltcls.waybill_no = lww.waybill_no
where ltcls.load_id = #{loadId} where ltcls.load_id = #{loadId}
and ltcls.warehouse_id = #{warehouseId} and ltcls.warehouse_id = #{warehouseId}
and ltcls.warehouse_id != ltcls.unload_node_id
group by ltcls.order_code, group by ltcls.order_code,
ltcls.waybill_no, ltcls.waybill_no,
ltcls.type, ltcls.type,
@ -706,7 +705,7 @@
<select id="findUnloadReport" resultType="com.logpm.trunkline.vo.UnloadReportVO"> <select id="findUnloadReport" resultType="com.logpm.trunkline.vo.UnloadReportVO">
select sum(IF(ltcls.final_node_id = #{warehouseId},ltcls.num,0)) loadingNum, select sum(IF(ltcls.final_node_id = #{warehouseId},ltcls.num,0)) loadingNum,
sum(IF(ltcls.unload_node_id = #{warehouseId},ltcls.num,0)) unloadNum, sum(IF(ltcls.unload_node_id = #{warehouseId},ltcls.num,0)) unloadNum,
sum(IF(ltcls.final_node_id = #{warehouseId} and ltcls.scan_status != '1' and ltcls.is_data = 0,ltcls.num,0)) noDataNum, sum(IF(ltcls.unload_node_id = #{warehouseId} and ltcls.scan_status != '1' and ltcls.is_data = 0,ltcls.num,0)) noDataNum,
sum(IF(ltcls.final_node_id = #{warehouseId} and ltcls.scan_status != '1' and ltco.id is null,ltcls.num,0)) noPlanNum, sum(IF(ltcls.final_node_id = #{warehouseId} and ltcls.scan_status != '1' and ltco.id is null,ltcls.num,0)) noPlanNum,
sum(IF(ltcls.final_node_id = #{warehouseId} and ltcls.scan_status = '1',ltcls.num,0))+sum(IF(ltcls.final_node_id = #{warehouseId} and ltcls.scan_status != '1',ltcls.num-ltcls.unload_num,0)) noUnloadNum, sum(IF(ltcls.final_node_id = #{warehouseId} and ltcls.scan_status = '1',ltcls.num,0))+sum(IF(ltcls.final_node_id = #{warehouseId} and ltcls.scan_status != '1',ltcls.num-ltcls.unload_num,0)) noUnloadNum,
sum(IF(ltcls.unload_node_id = #{warehouseId} and ltcls.type = 2 and ltcls.scan_status = '1',ltcls.unload_num,0)) manualNum sum(IF(ltcls.unload_node_id = #{warehouseId} and ltcls.type = 2 and ltcls.scan_status = '1',ltcls.unload_num,0)) manualNum

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

@ -423,7 +423,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
TrunklineCarsLoadLineEntity carsLoadLineEntity = trunklineCarsLoadLineService.findEntityByLoadIdAndNodeId(loadId, warehouseId); TrunklineCarsLoadLineEntity carsLoadLineEntity = trunklineCarsLoadLineService.findEntityByLoadIdAndNodeId(loadId, warehouseId);
if(!Objects.isNull(carsLoadLineEntity)){ if(!Objects.isNull(carsLoadLineEntity)){
carsLoadLineEntity.setUnloadReportStatus(1); carsLoadLineEntity.setUnloadReportStatus(1);
carsLoadLineEntity.setReportOne("本次装车件数 "+unloadReportVO.getLoadingNum()+" 件,实际卸车件数 "+unloadReportVO.getUnloadNum()+" 件,计划未卸车数量 "+(unloadReportVO.getLoadingNum()-unloadReportVO.getUnloadNum())+" 件"); carsLoadLineEntity.setReportOne("本次装车件数 "+unloadReportVO.getLoadingNum()+" 件,实际卸车件数 "+unloadReportVO.getUnloadNum()+" 件,计划未卸车数量 "+(unloadReportVO.getNoUnloadNum()-unloadReportVO.getNoPlanNum())+" 件");
carsLoadLineEntity.setReportTwo("无基础数据货物 "+unloadReportVO.getNoDataNum()+" 件、非计划内货物 "+unloadReportVO.getNoPlanNum()+" 件、手动确认入库 "+unloadReportVO.getManualNum()+" 件"); carsLoadLineEntity.setReportTwo("无基础数据货物 "+unloadReportVO.getNoDataNum()+" 件、非计划内货物 "+unloadReportVO.getNoPlanNum()+" 件、手动确认入库 "+unloadReportVO.getManualNum()+" 件");
trunklineCarsLoadLineService.updateById(carsLoadLineEntity); trunklineCarsLoadLineService.updateById(carsLoadLineEntity);
} }

2
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseWaybillDetailClient.java

@ -42,7 +42,7 @@ public class WarehouseWaybillDetailClient implements IWarehouseWaybillDetailClie
@Override @Override
public void updateEntityById(WarehouseWayBillDetail warehouseWayBillDetail) { public void updateEntityById(WarehouseWayBillDetail warehouseWayBillDetail) {
warehouseWayBillDetailService.update(warehouseWayBillDetail); warehouseWayBillDetailService.updateById(warehouseWayBillDetail);
} }
@Override @Override

7
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWayBillDetailService.java

@ -1,16 +1,13 @@
package com.logpm.warehouse.service; package com.logpm.warehouse.service;
import com.logpm.warehouse.entity.WarehouseWayBillDetail; import com.logpm.warehouse.entity.WarehouseWayBillDetail;
import org.springblade.core.mp.base.BaseService;
import java.util.List; import java.util.List;
public interface IWarehouseWayBillDetailService { public interface IWarehouseWayBillDetailService extends BaseService<WarehouseWayBillDetail> {
WarehouseWayBillDetail findByProductName(String productName); WarehouseWayBillDetail findByProductName(String productName);
void save(WarehouseWayBillDetail warehouseWayBillDetail);
void update(WarehouseWayBillDetail warehouseWayBillDetail);
List<WarehouseWayBillDetail> findByWaybillId(Long waybillId); List<WarehouseWayBillDetail> findByWaybillId(Long waybillId);
WarehouseWayBillDetail findByWaybillIdAndGoodsName(Long waybillId, String goodsName); WarehouseWayBillDetail findByWaybillIdAndGoodsName(Long waybillId, String goodsName);

2
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java

@ -737,7 +737,7 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
} }
//把parcelListEntityList通过orderCode进行分组 //把parcelListEntityList通过orderCode进行分组
Map<String, List<DistributionParcelListEntity>> map = parcelListEntityList.stream().collect(Collectors.groupingBy(DistributionParcelListEntity::getOrderCode)); Map<String, List<DistributionParcelListEntity>> map = parcelListEntityList.stream().filter(parcelListEntity -> "20".equals(parcelListEntity.getOrderPackageStatus())).collect(Collectors.groupingBy(DistributionParcelListEntity::getOrderCode));
FindParamterDTO findParamterDTO = new FindParamterDTO(); FindParamterDTO findParamterDTO = new FindParamterDTO();
findParamterDTO.setOrderCodeSet(map.keySet()); findParamterDTO.setOrderCodeSet(map.keySet());

2
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java

@ -1958,7 +1958,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
try{ try{
FindParamterDTO findParamterDTO = new FindParamterDTO(); FindParamterDTO findParamterDTO = new FindParamterDTO();
findParamterDTO.setOrderCodeList(orderPackageCodes); findParamterDTO.setOrderPackageCodeList(orderPackageCodes);
findParamterDTO.setWarehouseId(warehouseId); findParamterDTO.setWarehouseId(warehouseId);
List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListClient.findListByOrderPackageCodeList(findParamterDTO); List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListClient.findListByOrderPackageCodeList(findParamterDTO);

12
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWayBillDetailServiceImpl.java

@ -6,6 +6,7 @@ import com.logpm.warehouse.mapper.WarehouseWayBillDetailMapper;
import com.logpm.warehouse.service.IWarehouseWayBillDetailService; import com.logpm.warehouse.service.IWarehouseWayBillDetailService;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
@ -13,7 +14,7 @@ import java.util.List;
@Slf4j @Slf4j
@AllArgsConstructor @AllArgsConstructor
@Service @Service
public class WarehouseWayBillDetailServiceImpl implements IWarehouseWayBillDetailService { public class WarehouseWayBillDetailServiceImpl extends BaseServiceImpl<WarehouseWayBillDetailMapper,WarehouseWayBillDetail> implements IWarehouseWayBillDetailService {
private final WarehouseWayBillDetailMapper warehouseWayBillDetailMapper; private final WarehouseWayBillDetailMapper warehouseWayBillDetailMapper;
@ -24,15 +25,6 @@ public class WarehouseWayBillDetailServiceImpl implements IWarehouseWayBillDetai
return warehouseWayBillDetailMapper.selectOne(queryWrapper); return warehouseWayBillDetailMapper.selectOne(queryWrapper);
} }
@Override
public void save(WarehouseWayBillDetail warehouseWayBillDetail) {
warehouseWayBillDetailMapper.insert(warehouseWayBillDetail);
}
@Override
public void update(WarehouseWayBillDetail warehouseWayBillDetail) {
warehouseWayBillDetailMapper.updateById(warehouseWayBillDetail);
}
@Override @Override
public List<WarehouseWayBillDetail> findByWaybillId(Long waybillId) { public List<WarehouseWayBillDetail> findByWaybillId(Long waybillId) {

Loading…
Cancel
Save