Browse Source

数据看板、运单列表查询BUG修复、

fix-sign
汤建军 4 months ago
parent
commit
8586eb67f7
  1. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  2. 84
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java
  3. 1
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/indexCount/IndexSignforDataVO.java
  4. 31
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

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

@ -8251,6 +8251,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
deliveryListEntity.setOrderNumber(0);
deliveryListEntity.setDeliveryNumber(0);
deliveryListEntity.setInventoryNub(0);
deliveryListEntity.setIsDeleted(0);
this.updateById(deliveryListEntity);
return R.status(flag);
}

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

@ -609,20 +609,20 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
List<IndexSignforDataVO> monthData = bladeRedis.get(monthKey);
Map<Long, List<IndexSignforDataVO>> dayDataMap = null;
Map<Long, List<IndexSignforDataVO>> monthDataMap = null;
if (!Objects.isNull(dayData)){
dayDataMap = dayData.stream().collect(Collectors.groupingBy(IndexSignforDataVO::getWarehouseId));
if (!Objects.isNull(dayData)) {
dayDataMap = dayData.stream().collect(Collectors.groupingBy(IndexSignforDataVO::getWarehouseId));
}
if (!Objects.isNull(monthData)){
if (!Objects.isNull(monthData)) {
monthDataMap = monthData.stream().collect(Collectors.groupingBy(IndexSignforDataVO::getWarehouseId));
}
Map<String,Object> map = new HashMap<>();
Map<String, Object> map = new HashMap<>();
if (!warehouseIds.isEmpty()) {
List<IndexSignforDataVO> dayData1 = new ArrayList<>();
List<IndexSignforDataVO> monthData1 = new ArrayList<>();
for (Long warehouseId : warehouseIds) {
BasicdataWarehouseEntity warehouseEntity = warehouseClient.getEntityWarehouseId(warehouseId);
if (!warehouseEntity.getName().contains("测试")){
if (dayDataMap != null && !Objects.isNull(dayDataMap.get(warehouseId))){
if (!warehouseEntity.getName().contains("测试")) {
if (dayDataMap != null && !Objects.isNull(dayDataMap.get(warehouseId))) {
List<IndexSignforDataVO> indexSignforDayDataVO = dayDataMap.get(warehouseId);
dayData1.addAll(indexSignforDayDataVO);
} else {
@ -635,7 +635,7 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
indexBillSignforDayDataVO.setWarehouseName(warehouseEntity.getName());
dayData1.add(indexBillSignforDayDataVO);
}
if (monthDataMap != null && !Objects.isNull(monthDataMap.get(warehouseId))){
if (monthDataMap != null && !Objects.isNull(monthDataMap.get(warehouseId))) {
List<IndexSignforDataVO> indexSignforDataVOS = monthDataMap.get(warehouseId);
monthData1.addAll(indexSignforDataVOS);
} else {
@ -647,8 +647,8 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
indexBillSignforMonthDataVO.setWarehouseName(warehouseEntity.getName());
monthData1.add(indexBillSignforMonthDataVO);
}
map.put("dayData",dayData1);
map.put("monthData",monthData1);
map.put("dayData", dayData1);
map.put("monthData", monthData1);
}
}
bladeRedis.setEx(dayKey, dayData1, 3600L);
@ -659,42 +659,42 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
private IndexSignforDataVO handleBillDataByMonth(Long warehouseId) {
IndexSignforDataVO indexBillLadingSignforMonthDataVO = new IndexSignforDataVO();
indexBillLadingSignforMonthDataVO.setWarehouseId(warehouseId);
indexBillLadingSignforMonthDataVO.setType(2);
//查询自提当月签收情况
String monthBillLadingSignfor = warehouseIndexMapper.findBillLadingSignforByMonth(warehouseId);
indexBillLadingSignforMonthDataVO.setSignNum(monthBillLadingSignfor);
//查询自提当月未签数量
String monthBillLadingUnSignfor = warehouseIndexMapper.findBillLadingUnSignforByMonth(warehouseId);
indexBillLadingSignforMonthDataVO.setUnSignNum(monthBillLadingUnSignfor);
//计算当月的签收率
indexBillLadingSignforMonthDataVO.setWarehouseId(warehouseId);
indexBillLadingSignforMonthDataVO.setType(2);
//查询自提当月签收情况
String monthBillLadingSignfor = warehouseIndexMapper.findBillLadingSignforByMonth(warehouseId);
indexBillLadingSignforMonthDataVO.setSignNum(monthBillLadingSignfor);
//查询自提当月未签数量
String monthBillLadingUnSignfor = warehouseIndexMapper.findBillLadingUnSignforByMonth(warehouseId);
indexBillLadingSignforMonthDataVO.setUnSignNum(monthBillLadingUnSignfor);
//计算当月的签收率
indexBillLadingSignforMonthDataVO.setSignScale("0.0000");
if (!"0".equals(monthBillLadingSignfor) && !"0".equals(monthBillLadingUnSignfor)) {
BigDecimal bd1 = new BigDecimal(monthBillLadingSignfor);
BigDecimal bd2 = new BigDecimal(monthBillLadingUnSignfor);
BigDecimal multiply = bd1.divide(bd1.add(bd2), 4, BigDecimal.ROUND_CEILING);
String signScale = multiply.toString();
indexBillLadingSignforMonthDataVO.setSignScale(signScale);
}
//查询当月文员签收数
String monthBillLadingSignforNum = warehouseIndexMapper.findBillLadingSignForNumByMonth(warehouseId);
indexBillLadingSignforMonthDataVO.setClerkSignNum(monthBillLadingSignforNum);
//查询当月文员超时签收数
String monthBillLadingOverTimeNum = warehouseIndexMapper.findBillLadingOverTimeNumByMonth(warehouseId);
indexBillLadingSignforMonthDataVO.setClerkOverTimeSignfoNum(monthBillLadingOverTimeNum);
//查询当月计划总数
String monthBillLadingPlanNum = warehouseIndexMapper.findBillLadingPlanNumByMonth(warehouseId);
BigDecimal bd1 = new BigDecimal(monthBillLadingSignfor);
BigDecimal bd2 = new BigDecimal(monthBillLadingUnSignfor);
BigDecimal multiply = bd1.divide(bd1.add(bd2), 4, BigDecimal.ROUND_CEILING);
String signScale = multiply.toString();
indexBillLadingSignforMonthDataVO.setSignScale(signScale);
}
//查询当月文员签收数
String monthBillLadingSignforNum = warehouseIndexMapper.findBillLadingSignForNumByMonth(warehouseId);
indexBillLadingSignforMonthDataVO.setClerkSignNum(monthBillLadingSignforNum);
//查询当月文员超时签收数
String monthBillLadingOverTimeNum = warehouseIndexMapper.findBillLadingOverTimeNumByMonth(warehouseId);
indexBillLadingSignforMonthDataVO.setClerkOverTimeSignfoNum(monthBillLadingOverTimeNum);
//查询当月计划总数
String monthBillLadingPlanNum = warehouseIndexMapper.findBillLadingPlanNumByMonth(warehouseId);
indexBillLadingSignforMonthDataVO.setClerkSignNum(monthBillLadingPlanNum);
indexBillLadingSignforMonthDataVO.setClerkOverTimeScale("0.0000");
if (!"0".equals(monthBillLadingOverTimeNum) && !"0".equals(monthBillLadingPlanNum)) {
//计算当月的超时签收率
BigDecimal bd1 = new BigDecimal(monthBillLadingOverTimeNum);
BigDecimal bd2 = new BigDecimal(monthBillLadingPlanNum);
BigDecimal multiply = bd1.divide(bd1.add(bd2), 4, BigDecimal.ROUND_CEILING);
String signScale = multiply.toString();
indexBillLadingSignforMonthDataVO.setClerkOverTimeScale(signScale);
}
//计算当月的超时签收率
BigDecimal bd1 = new BigDecimal(monthBillLadingOverTimeNum);
BigDecimal bd2 = new BigDecimal(monthBillLadingPlanNum);
BigDecimal multiply = bd1.divide(bd1.add(bd2), 4, BigDecimal.ROUND_CEILING);
String signScale = multiply.toString();
indexBillLadingSignforMonthDataVO.setClerkOverTimeScale(signScale);
}
return indexBillLadingSignforMonthDataVO;
}
@ -720,7 +720,7 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
}
//查询当天计划数
String dayBillLadingPlanNum = warehouseIndexMapper.findBillLadingPlanNumByDay(warehouseId);
indexBillLadingSignforDayDataVO.setPlanNum(dayBillLadingPlanNum);
indexBillLadingSignforDayDataVO.setClerkOverTimeScale("0.0000");
//查询当天文员复核数
String dayBillLadingSignforNum = warehouseIndexMapper.findBillLadingSignForNumByDay(warehouseId);
@ -763,6 +763,7 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
String monthClerkSignforNum = warehouseIndexMapper.findClerkSignforNumByMonth(warehouseId);
indexSignforMonthDataVO.setClerkSignNum(monthClerkSignforNum);
String monthPlan = warehouseIndexMapper.findPlanNumByMonth(warehouseId);
indexSignforMonthDataVO.setClerkSignNum(monthPlan);
if (!"0".equals(monthClerkSignforNum) && !"0".equals(monthPlan)) {
BigDecimal bd1 = new BigDecimal(monthClerkSignforNum);
BigDecimal bd2 = new BigDecimal(monthPlan);
@ -808,6 +809,7 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
indexSignforDayDataVO.setClerkSignNum(dayClerkSignforNum);
//查询计划数量
String dayPlanByday = warehouseIndexMapper.findPlanNumByDay(warehouseId);
indexSignforDayDataVO.setPlanNum(dayClerkSignforNum);
//计算文员签收率
indexSignforDayDataVO.setClerkSignforScale("0.0000");
if (!"0".equals(dayClerkSignforNum) && !"0".equals(dayPlanByday)) {

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

@ -26,6 +26,7 @@ public class IndexSignforDataVO implements Serializable {
private String ClerkSignforScale;
//复核数
private String clerkSignNum;
private String planNum;
//仓库名称
private String warehouseName;
private Long warehouseId;

31
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

@ -722,22 +722,23 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
Map<Long, List<WarehouseWayBillDetail>> map = wayBillDetailList.stream().collect(Collectors.groupingBy(WarehouseWayBillDetail::getWaybillId));
for (WarehouseWaybillVO record : records) {
Long waybillId = record.getId();
List<WarehouseWayBillDetail> warehouseWayBillDetails = map.get(waybillId);
// 将集合 warehouseWayBillDetails 中的productName 按照, 进行拼接
String productNames = warehouseWayBillDetails.stream().filter(s -> StringUtil.isNotBlank(s.getProductName())).map(WarehouseWayBillDetail::getProductName).collect(Collectors.joining(","));
record.setGoodsName(productNames);
String productNum = warehouseWayBillDetails.stream().filter(s -> !Objects.isNull(s.getNum())).map(s -> s.getNum().toString()).collect(Collectors.joining(","));
record.setProductNum(productNum);
String productPrice = warehouseWayBillDetails.stream().filter(s -> !Objects.isNull(s.getPrice())).map(s -> s.getPrice().toString()).collect(Collectors.joining(","));
record.setProductPrice(productPrice);
// 对集合中的weight 进行求和
BigDecimal sumWeight = warehouseWayBillDetails.stream().filter(s -> !Objects.isNull(s.getWeight())).map(WarehouseWayBillDetail::getWeight).reduce(BigDecimal.ZERO, BigDecimal::add);
record.setTotalWeight(sumWeight);
BigDecimal productVolume = warehouseWayBillDetails.stream().filter(s -> !Objects.isNull(s.getVolume())).map(WarehouseWayBillDetail::getVolume).reduce(BigDecimal.ZERO, BigDecimal::add);
record.setTotalVolume(productVolume);
if (!Objects.isNull(map.get(waybillId))){
List<WarehouseWayBillDetail> warehouseWayBillDetails = map.get(waybillId);
// 将集合 warehouseWayBillDetails 中的productName 按照, 进行拼接
String productNames = warehouseWayBillDetails.stream().filter(s -> StringUtil.isNotBlank(s.getProductName())).map(WarehouseWayBillDetail::getProductName).collect(Collectors.joining(","));
record.setGoodsName(productNames);
String productNum = warehouseWayBillDetails.stream().filter(s -> !Objects.isNull(s.getNum())).map(s -> s.getNum().toString()).collect(Collectors.joining(","));
record.setProductNum(productNum);
String productPrice = warehouseWayBillDetails.stream().filter(s -> !Objects.isNull(s.getPrice())).map(s -> s.getPrice().toString()).collect(Collectors.joining(","));
record.setProductPrice(productPrice);
// 对集合中的weight 进行求和
BigDecimal sumWeight = warehouseWayBillDetails.stream().filter(s -> !Objects.isNull(s.getWeight())).map(WarehouseWayBillDetail::getWeight).reduce(BigDecimal.ZERO, BigDecimal::add);
record.setTotalWeight(sumWeight);
BigDecimal productVolume = warehouseWayBillDetails.stream().filter(s -> !Objects.isNull(s.getVolume())).map(WarehouseWayBillDetail::getVolume).reduce(BigDecimal.ZERO, BigDecimal::add);
record.setTotalVolume(productVolume);
record.setDetailList(warehouseWayBillDetails);
}
record.setDetailList(warehouseWayBillDetails);
}
pageList.setRecords(records);
}

Loading…
Cancel
Save