|
|
|
@ -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)) { |
|
|
|
|