Merge remote-tracking branch 'origin/dev_WMS20260401' into dev_WMS20260401
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
|||||||
|
package com.mhd.bi.domain.biHkMacaoServiceZone.repository.mapper;
|
||||||
|
|
||||||
|
import com.mhd.bi.domain.biReport.support.BiReportSnapshotMapperSupport;
|
||||||
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone.HkMacaoServiceZoneVO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 港澳服务专区:取 NGWL_TEST_BI.BI_HK_MACAO_SERVICE_ZONE_SNAPSHOT 最新 PAYLOAD_JSON 并解析。
|
||||||
|
*/
|
||||||
|
public interface BiHkMacaoServiceZoneReportMapper {
|
||||||
|
|
||||||
|
String selectLatestPayloadJson();
|
||||||
|
|
||||||
|
default HkMacaoServiceZoneVO loadLatestHkMacaoServiceZone() {
|
||||||
|
return BiReportSnapshotMapperSupport.parsePayload(
|
||||||
|
selectLatestPayloadJson(),
|
||||||
|
HkMacaoServiceZoneVO.class,
|
||||||
|
BiReportSnapshotMapperSupport::emptyHkMacaoServiceZone,
|
||||||
|
"港澳服务专区");
|
||||||
|
}
|
||||||
|
}
|
||||||
+21
@@ -0,0 +1,21 @@
|
|||||||
|
package com.mhd.bi.domain.biHkMacaoServiceZone.service;
|
||||||
|
|
||||||
|
import com.mhd.bi.domain.biHkMacaoServiceZone.repository.mapper.BiHkMacaoServiceZoneReportMapper;
|
||||||
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone.HkMacaoServiceZoneVO;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 港澳服务专区
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class BiHkMacaoServiceZoneReportService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BiHkMacaoServiceZoneReportMapper biHkMacaoServiceZoneReportMapper;
|
||||||
|
|
||||||
|
public HkMacaoServiceZoneVO loadLatestHkMacaoServiceZone() {
|
||||||
|
return biHkMacaoServiceZoneReportMapper.loadLatestHkMacaoServiceZone();
|
||||||
|
}
|
||||||
|
}
|
||||||
+150
@@ -0,0 +1,150 @@
|
|||||||
|
package com.mhd.bi.domain.biHkMacaoServiceZone.support;
|
||||||
|
|
||||||
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone.*;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 港澳服务专区快照演示数据(对齐大屏示例 JSON;后续可改为真实聚合)。
|
||||||
|
*/
|
||||||
|
public final class HkMacaoServiceZoneDemoData {
|
||||||
|
|
||||||
|
private HkMacaoServiceZoneDemoData() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static HkMacaoServiceZoneVO build() {
|
||||||
|
HkOrderStatsVO orderStats = HkOrderStatsVO.builder()
|
||||||
|
.totalOrders(4361L)
|
||||||
|
.unit("单")
|
||||||
|
.momGrowth("+12.5%")
|
||||||
|
.trend("up")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
List<HkPercentageDetailVO> goodsDetails = Arrays.asList(
|
||||||
|
HkPercentageDetailVO.builder().name("广东").percentage("25%").build(),
|
||||||
|
HkPercentageDetailVO.builder().name("澳门").percentage("25%").build(),
|
||||||
|
HkPercentageDetailVO.builder().name("广西").percentage("50%").build()
|
||||||
|
);
|
||||||
|
|
||||||
|
List<HkPercentageDetailVO> crossBorderDetails = Arrays.asList(
|
||||||
|
HkPercentageDetailVO.builder().name("出口订单").percentage("25.8%").build(),
|
||||||
|
HkPercentageDetailVO.builder().name("进口订单").percentage("16.8%").build()
|
||||||
|
);
|
||||||
|
|
||||||
|
List<HkOrderTrendMonthVO> warehouseOrderTrend = Arrays.asList(
|
||||||
|
HkOrderTrendMonthVO.builder().month("1月").orderRatio(150).orderCount(400).build(),
|
||||||
|
HkOrderTrendMonthVO.builder().month("2月").orderRatio(200).orderCount(250).build(),
|
||||||
|
HkOrderTrendMonthVO.builder().month("3月").orderRatio(250).orderCount(300).build(),
|
||||||
|
HkOrderTrendMonthVO.builder().month("4月").orderRatio(200).orderCount(280).build(),
|
||||||
|
HkOrderTrendMonthVO.builder().month("5月").orderRatio(280).orderCount(320).build(),
|
||||||
|
HkOrderTrendMonthVO.builder().month("6月").orderRatio(220).orderCount(310).build(),
|
||||||
|
HkOrderTrendMonthVO.builder().month("7月").orderRatio(260).orderCount(330).build()
|
||||||
|
);
|
||||||
|
|
||||||
|
List<HkMonthRatePointVO> turnoverData = Arrays.asList(
|
||||||
|
HkMonthRatePointVO.builder().month("11月").rate(10).build(),
|
||||||
|
HkMonthRatePointVO.builder().month("12月").rate(15).build(),
|
||||||
|
HkMonthRatePointVO.builder().month("1月").rate(22).build(),
|
||||||
|
HkMonthRatePointVO.builder().month("2月").rate(20).build(),
|
||||||
|
HkMonthRatePointVO.builder().month("3月").rate(12).build(),
|
||||||
|
HkMonthRatePointVO.builder().month("4月").rate(16).build()
|
||||||
|
);
|
||||||
|
|
||||||
|
List<HkMonthValuePointVO> cargoVolumeTrend = Arrays.asList(
|
||||||
|
HkMonthValuePointVO.builder().month("1月").value(80).build(),
|
||||||
|
HkMonthValuePointVO.builder().month("2月").value(85).build(),
|
||||||
|
HkMonthValuePointVO.builder().month("3月").value(90).build(),
|
||||||
|
HkMonthValuePointVO.builder().month("4月").value(70).build(),
|
||||||
|
HkMonthValuePointVO.builder().month("5月").value(95).build(),
|
||||||
|
HkMonthValuePointVO.builder().month("6月").value(88).build()
|
||||||
|
);
|
||||||
|
|
||||||
|
List<HkOrderTrendMonthVO> transportOrderTrend = Arrays.asList(
|
||||||
|
HkOrderTrendMonthVO.builder().month("1月").orderRatio(150).orderCount(400).build(),
|
||||||
|
HkOrderTrendMonthVO.builder().month("2月").orderRatio(200).orderCount(250).build(),
|
||||||
|
HkOrderTrendMonthVO.builder().month("3月").orderRatio(250).orderCount(300).build(),
|
||||||
|
HkOrderTrendMonthVO.builder().month("4月").orderRatio(200).orderCount(280).build(),
|
||||||
|
HkOrderTrendMonthVO.builder().month("5月").orderRatio(280).orderCount(320).build(),
|
||||||
|
HkOrderTrendMonthVO.builder().month("6月").orderRatio(220).orderCount(310).build(),
|
||||||
|
HkOrderTrendMonthVO.builder().month("7月").orderRatio(260).orderCount(330).build()
|
||||||
|
);
|
||||||
|
|
||||||
|
List<HkMonthRatePointVO> onTimeDeliveryRate = Arrays.asList(
|
||||||
|
HkMonthRatePointVO.builder().month("1月").rate(90).build(),
|
||||||
|
HkMonthRatePointVO.builder().month("2月").rate(92).build(),
|
||||||
|
HkMonthRatePointVO.builder().month("3月").rate(88).build(),
|
||||||
|
HkMonthRatePointVO.builder().month("4月").rate(85).build(),
|
||||||
|
HkMonthRatePointVO.builder().month("5月").rate(95).build(),
|
||||||
|
HkMonthRatePointVO.builder().month("6月").rate(93).build()
|
||||||
|
);
|
||||||
|
|
||||||
|
List<HkMapPointVO> mapPoints = Arrays.asList(
|
||||||
|
HkMapPointVO.builder()
|
||||||
|
.id("wh_001")
|
||||||
|
.type("warehouse")
|
||||||
|
.name("通宇保税仓")
|
||||||
|
.status("normal")
|
||||||
|
.location(HkMapLocationVO.builder().lat(22.2800).lng(113.5600).build())
|
||||||
|
.metrics(HkWarehouseMetricsVO.builder()
|
||||||
|
.inboundOperations(1)
|
||||||
|
.outboundOperations(1)
|
||||||
|
.build())
|
||||||
|
.build(),
|
||||||
|
HkMapPointVO.builder()
|
||||||
|
.id("vehicle_88888")
|
||||||
|
.type("vehicle")
|
||||||
|
.name("粤A88888")
|
||||||
|
.status("in_transit")
|
||||||
|
.location(HkMapLocationVO.builder().lat(22.2500).lng(113.5500).build())
|
||||||
|
.details(HkVehicleDetailsVO.builder()
|
||||||
|
.warehouseName("通宇")
|
||||||
|
.licensePlate("粤A88888")
|
||||||
|
.loadingAddress("珠海")
|
||||||
|
.destinationAddress("澳门")
|
||||||
|
.currentLocation("珠海市")
|
||||||
|
.updateTime("2026年4月15日 17:52")
|
||||||
|
.build())
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
|
||||||
|
return HkMacaoServiceZoneVO.builder()
|
||||||
|
.warehouseOrderStats(orderStats)
|
||||||
|
.clientServiceStats(HkClientServiceStatsVO.builder()
|
||||||
|
.hkMacaoClients(26)
|
||||||
|
.clientRatio("10.5%")
|
||||||
|
.warehouseUsageArea("1688m2")
|
||||||
|
.areaRatio("1.5%")
|
||||||
|
.build())
|
||||||
|
.goodsSourceStats(HkRingChartStatsVO.builder()
|
||||||
|
.totalOrders(1000)
|
||||||
|
.details(goodsDetails)
|
||||||
|
.build())
|
||||||
|
.crossBorderOrderStats(HkRingChartStatsVO.builder()
|
||||||
|
.totalOrders(400)
|
||||||
|
.details(crossBorderDetails)
|
||||||
|
.build())
|
||||||
|
.warehouseOrderTrend(warehouseOrderTrend)
|
||||||
|
.inventoryTurnoverTrend(HkInventoryTurnoverTrendVO.builder()
|
||||||
|
.currentMonthRate("3次")
|
||||||
|
.annualRate("4次")
|
||||||
|
.unit("次")
|
||||||
|
.data(turnoverData)
|
||||||
|
.build())
|
||||||
|
.transportOrderStats(orderStats)
|
||||||
|
.doorToDoorEfficiency(HkDoorToDoorEfficiencyVO.builder()
|
||||||
|
.averageTime("28.6分")
|
||||||
|
.fastestTime("13.2分")
|
||||||
|
.momGrowth("+30%")
|
||||||
|
.build())
|
||||||
|
.crossBorderTransportStats(HkRingChartStatsVO.builder()
|
||||||
|
.totalOrders(400)
|
||||||
|
.details(crossBorderDetails)
|
||||||
|
.build())
|
||||||
|
.cargoVolumeTrend(cargoVolumeTrend)
|
||||||
|
.transportOrderTrend(transportOrderTrend)
|
||||||
|
.onTimeDeliveryRate(onTimeDeliveryRate)
|
||||||
|
.mapData(HkMapDataVO.builder().points(mapPoints).build())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
+5
-2
@@ -1,5 +1,6 @@
|
|||||||
package com.mhd.bi.domain.biOverallOperation.repository.mapper;
|
package com.mhd.bi.domain.biOverallOperation.repository.mapper;
|
||||||
|
|
||||||
|
import com.mhd.bi.domain.biOverallOperation.support.OverallOperationPayloadNormalizer;
|
||||||
import com.mhd.bi.domain.biReport.support.BiReportSnapshotMapperSupport;
|
import com.mhd.bi.domain.biReport.support.BiReportSnapshotMapperSupport;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.overall.OverallOperationSituationVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.overall.OverallOperationSituationVO;
|
||||||
|
|
||||||
@@ -11,10 +12,12 @@ public interface BiOverallOperationReportMapper {
|
|||||||
String selectLatestPayloadJson();
|
String selectLatestPayloadJson();
|
||||||
|
|
||||||
default OverallOperationSituationVO loadLatestOverallOperation() {
|
default OverallOperationSituationVO loadLatestOverallOperation() {
|
||||||
return BiReportSnapshotMapperSupport.parsePayload(
|
String json = OverallOperationPayloadNormalizer.normalizeJson(selectLatestPayloadJson());
|
||||||
selectLatestPayloadJson(),
|
OverallOperationSituationVO vo = BiReportSnapshotMapperSupport.parsePayload(
|
||||||
|
json,
|
||||||
OverallOperationSituationVO.class,
|
OverallOperationSituationVO.class,
|
||||||
BiReportSnapshotMapperSupport::emptyOverallOperationSituation,
|
BiReportSnapshotMapperSupport::emptyOverallOperationSituation,
|
||||||
"总体运营态势");
|
"总体运营态势");
|
||||||
|
return OverallOperationPayloadNormalizer.ensureDefaults(vo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+95
@@ -0,0 +1,95 @@
|
|||||||
|
package com.mhd.bi.domain.biOverallOperation.support;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
|
import com.mhd.bi.domain.biReport.support.BiInventoryTurnoverTrendSupport;
|
||||||
|
import com.mhd.bi.domain.biReport.support.BiOnTimeDeliveryRateChartSupport;
|
||||||
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.overall.OverallOperationSituationVO;
|
||||||
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.overall.OverallTransportOperationVO;
|
||||||
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.overall.OverallWarehouseOperationVO;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总体运营态势:左侧 warehouse.turnover_rate_trend;右下角 transport.on_time_rate。
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
public final class OverallOperationPayloadNormalizer {
|
||||||
|
|
||||||
|
private static final ObjectMapper MAPPER = new ObjectMapper();
|
||||||
|
|
||||||
|
private OverallOperationPayloadNormalizer() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String normalizeJson(String json) {
|
||||||
|
if (StringUtils.isBlank(json)) {
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
JsonNode root = MAPPER.readTree(json.trim());
|
||||||
|
boolean changed = false;
|
||||||
|
|
||||||
|
ObjectNode rootObj = (ObjectNode) root;
|
||||||
|
JsonNode warehouse = root.path("warehouse");
|
||||||
|
if (warehouse.isObject()) {
|
||||||
|
ObjectNode warehouseObj = (ObjectNode) warehouse;
|
||||||
|
if (warehouseObj.has("map") && !rootObj.has("map")) {
|
||||||
|
rootObj.set("map", warehouseObj.remove("map"));
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
if (warehouseObj.has("transport") && !rootObj.has("transport")) {
|
||||||
|
rootObj.set("transport", warehouseObj.remove("transport"));
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
if (warehouseObj.has("capabilityRanking")) {
|
||||||
|
warehouseObj.remove("capabilityRanking");
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
if (warehouseObj.has("on_time_rate")) {
|
||||||
|
warehouseObj.remove("on_time_rate");
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
if (!warehouseObj.has("turnover_rate_trend")) {
|
||||||
|
warehouseObj.set("turnover_rate_trend",
|
||||||
|
MAPPER.valueToTree(BiInventoryTurnoverTrendSupport.defaultTrend()));
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
JsonNode transport = root.path("transport");
|
||||||
|
if (transport.isObject()) {
|
||||||
|
ObjectNode transportObj = (ObjectNode) transport;
|
||||||
|
if (transportObj.has("enterpriseRanking")) {
|
||||||
|
transportObj.remove("enterpriseRanking");
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
if (!transportObj.has("on_time_rate")) {
|
||||||
|
transportObj.set("on_time_rate",
|
||||||
|
MAPPER.valueToTree(BiOnTimeDeliveryRateChartSupport.defaultChart()));
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return changed ? MAPPER.writeValueAsString(root) : json;
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.warn("总体运营态势 PAYLOAD_JSON 规范化失败,按原 JSON 解析", e);
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static OverallOperationSituationVO ensureDefaults(OverallOperationSituationVO vo) {
|
||||||
|
if (vo == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
OverallWarehouseOperationVO warehouse = vo.getWarehouse();
|
||||||
|
if (warehouse != null && BiInventoryTurnoverTrendSupport.isEmpty(warehouse.getTurnoverRateTrend())) {
|
||||||
|
warehouse.setTurnoverRateTrend(BiInventoryTurnoverTrendSupport.defaultTrend());
|
||||||
|
}
|
||||||
|
OverallTransportOperationVO transport = vo.getTransport();
|
||||||
|
if (transport != null && BiOnTimeDeliveryRateChartSupport.isChartEmpty(transport.getOnTimeRate())) {
|
||||||
|
transport.setOnTimeRate(BiOnTimeDeliveryRateChartSupport.defaultChart());
|
||||||
|
}
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
}
|
||||||
+42
@@ -0,0 +1,42 @@
|
|||||||
|
package com.mhd.bi.domain.biReport.support;
|
||||||
|
|
||||||
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.warehouseZone.WhMonthRatePointVO;
|
||||||
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.warehouseZone.WhTurnoverRateTrendVO;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总体运营态势左侧「库存周转率趋势」默认数据(与仓储运营专区 turnover_rate_trend 结构一致)
|
||||||
|
*/
|
||||||
|
public final class BiInventoryTurnoverTrendSupport {
|
||||||
|
|
||||||
|
private BiInventoryTurnoverTrendSupport() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static WhTurnoverRateTrendVO defaultTrend() {
|
||||||
|
return WhTurnoverRateTrendVO.builder()
|
||||||
|
.currentMonth("3次")
|
||||||
|
.annual("4次")
|
||||||
|
.data(Arrays.asList(
|
||||||
|
WhMonthRatePointVO.builder().month("11月").rate(10).build(),
|
||||||
|
WhMonthRatePointVO.builder().month("12月").rate(15).build(),
|
||||||
|
WhMonthRatePointVO.builder().month("1月").rate(22).build(),
|
||||||
|
WhMonthRatePointVO.builder().month("2月").rate(20).build(),
|
||||||
|
WhMonthRatePointVO.builder().month("3月").rate(12).build(),
|
||||||
|
WhMonthRatePointVO.builder().month("4月").rate(16).build()
|
||||||
|
))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isEmpty(WhTurnoverRateTrendVO trend) {
|
||||||
|
return trend == null || trend.getData() == null || trend.getData().isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static WhTurnoverRateTrendVO emptyShell() {
|
||||||
|
return WhTurnoverRateTrendVO.builder()
|
||||||
|
.currentMonth("")
|
||||||
|
.annual("")
|
||||||
|
.data(java.util.Collections.emptyList())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
+50
@@ -0,0 +1,50 @@
|
|||||||
|
package com.mhd.bi.domain.biReport.support;
|
||||||
|
|
||||||
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone.TrMonthValuePointVO;
|
||||||
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone.TrTypedChartVO;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 准时配送率折线图(总体运营 transport.on_time_rate、运输运营专区 on_time_rate 共用)
|
||||||
|
*/
|
||||||
|
public final class BiOnTimeDeliveryRateChartSupport {
|
||||||
|
|
||||||
|
private BiOnTimeDeliveryRateChartSupport() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static TrTypedChartVO defaultChart() {
|
||||||
|
return TrTypedChartVO.builder()
|
||||||
|
.title("准时配送率")
|
||||||
|
.type("line")
|
||||||
|
.unit("%")
|
||||||
|
.data(defaultMonthPoints())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<TrMonthValuePointVO> defaultMonthPoints() {
|
||||||
|
return Arrays.asList(
|
||||||
|
TrMonthValuePointVO.builder().month("1月").value(98).build(),
|
||||||
|
TrMonthValuePointVO.builder().month("2月").value(96).build(),
|
||||||
|
TrMonthValuePointVO.builder().month("3月").value(85).build(),
|
||||||
|
TrMonthValuePointVO.builder().month("4月").value(70).build(),
|
||||||
|
TrMonthValuePointVO.builder().month("5月").value(92).build(),
|
||||||
|
TrMonthValuePointVO.builder().month("6月").value(90).build()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isChartEmpty(TrTypedChartVO chart) {
|
||||||
|
return chart == null || chart.getData() == null || chart.getData().isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static TrTypedChartVO emptyChartShell() {
|
||||||
|
return TrTypedChartVO.builder()
|
||||||
|
.title("")
|
||||||
|
.type("")
|
||||||
|
.unit("")
|
||||||
|
.data(Collections.emptyList())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
+69
-2
@@ -5,7 +5,9 @@ import com.mhd.bi.interfaces.facadeApi.biReport.vo.ComprehensiveSituationVO;
|
|||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.CustomerContributionRankVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.CustomerContributionRankVO;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.WarehouseTransportSituationVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.WarehouseTransportSituationVO;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.overall.*;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.overall.*;
|
||||||
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone.TrTypedChartVO;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.platform.*;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.platform.*;
|
||||||
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone.*;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone.*;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone.*;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.warehouseZone.*;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.warehouseZone.*;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -116,7 +118,7 @@ public final class BiReportSnapshotMapperSupport {
|
|||||||
.customerCount(0L).coverageArea("")
|
.customerCount(0L).coverageArea("")
|
||||||
.annualThroughput(0).throughputUnit("").throughputGrowth(0d)
|
.annualThroughput(0).throughputUnit("").throughputGrowth(0d)
|
||||||
.build())
|
.build())
|
||||||
.capabilityRanking(Collections.emptyList())
|
.turnoverRateTrend(BiInventoryTurnoverTrendSupport.defaultTrend())
|
||||||
.build())
|
.build())
|
||||||
.map(OverallMapSectionVO.builder().nodes(Collections.emptyList()).build())
|
.map(OverallMapSectionVO.builder().nodes(Collections.emptyList()).build())
|
||||||
.transport(OverallTransportOperationVO.builder()
|
.transport(OverallTransportOperationVO.builder()
|
||||||
@@ -132,13 +134,28 @@ public final class BiReportSnapshotMapperSupport {
|
|||||||
.freightTrendByMonth(Collections.emptyList())
|
.freightTrendByMonth(Collections.emptyList())
|
||||||
.orderDistribution(OverallTransportModeDistributionVO.builder()
|
.orderDistribution(OverallTransportModeDistributionVO.builder()
|
||||||
.crossBorder(0L).domestic(0L).build())
|
.crossBorder(0L).domestic(0L).build())
|
||||||
.enterpriseRanking(Collections.emptyList())
|
.onTimeRate(BiOnTimeDeliveryRateChartSupport.emptyChartShell())
|
||||||
.build())
|
.build())
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static WarehouseOperationZoneVO emptyWarehouseOperationZone() {
|
public static WarehouseOperationZoneVO emptyWarehouseOperationZone() {
|
||||||
|
WhColdStorageMetricVO emptyColdMetric = WhColdStorageMetricVO.builder().value("").trend("").build();
|
||||||
return WarehouseOperationZoneVO.builder()
|
return WarehouseOperationZoneVO.builder()
|
||||||
|
.warehouseName("")
|
||||||
|
.updateTime("")
|
||||||
|
.orderSummary(WhOrderSummaryVO.builder()
|
||||||
|
.totalCount("")
|
||||||
|
.inboundOrders(WhOrderSummaryCountItemVO.builder().label("").value(0).build())
|
||||||
|
.outboundOrders(WhOrderSummaryCountItemVO.builder().label("").value(0).build())
|
||||||
|
.operationOrders(WhOrderSummaryCountItemVO.builder().label("").value(0).build())
|
||||||
|
.build())
|
||||||
|
.coldStorageStats(WhColdStorageStatsVO.builder()
|
||||||
|
.revenueShare(emptyColdMetric)
|
||||||
|
.utilizationRate(emptyColdMetric)
|
||||||
|
.damageRate(emptyColdMetric)
|
||||||
|
.build())
|
||||||
|
.temperatureExceptions(Collections.emptyList())
|
||||||
.storageOverview(WhStorageOverviewVO.builder()
|
.storageOverview(WhStorageOverviewVO.builder()
|
||||||
.title("").value(0).unit("").subText("").build())
|
.title("").value(0).unit("").subText("").build())
|
||||||
.operationStats(WhOperationStatsVO.builder()
|
.operationStats(WhOperationStatsVO.builder()
|
||||||
@@ -204,6 +221,56 @@ public final class BiReportSnapshotMapperSupport {
|
|||||||
.title("").unit("").data(Collections.emptyList()).build())
|
.title("").unit("").data(Collections.emptyList()).build())
|
||||||
.transportSummary(TrTransportSummaryVO.builder()
|
.transportSummary(TrTransportSummaryVO.builder()
|
||||||
.title("").safeMileage("").avgDeliveryTime("").build())
|
.title("").safeMileage("").avgDeliveryTime("").build())
|
||||||
|
.capacityStats(TrCapacityStatsVO.builder()
|
||||||
|
.vehicles(emptyCapacityStatItem())
|
||||||
|
.drivers(emptyCapacityStatItem())
|
||||||
|
.escorts(emptyCapacityStatItem())
|
||||||
|
.build())
|
||||||
|
.cargoTypeDistribution(TrCargoTypeDistributionVO.builder()
|
||||||
|
.title("").totalOrders(0).totalUnit("").details(Collections.emptyList()).build())
|
||||||
|
.freshOrderStats(emptyBrandOrderStats())
|
||||||
|
.vitasoyOrderStats(emptyBrandOrderStats())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static TrBrandOrderStatsVO emptyBrandOrderStats() {
|
||||||
|
return TrBrandOrderStatsVO.builder()
|
||||||
|
.plannedDelivery(TrOrderStatMetricVO.builder().value(0).unit("").label("").build())
|
||||||
|
.orderQuantity(TrOrderStatMetricVO.builder().value(0).unit("").label("").build())
|
||||||
|
.vehiclesInTransit(TrOrderStatMetricVO.builder().value(0).unit("").label("").build())
|
||||||
|
.completedDelivery(TrOrderStatTextMetricVO.builder().value("").unit("").label("").build())
|
||||||
|
.overtimeDelivery(TrOrderStatMetricVO.builder().value(0).unit("").label("").build())
|
||||||
|
.onTimeRate(TrOrderStatRateMetricVO.builder().value("").trend("").label("").build())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static TrCapacityStatItemVO emptyCapacityStatItem() {
|
||||||
|
return TrCapacityStatItemVO.builder().value(0).unit("").label("").build();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static HkMacaoServiceZoneVO emptyHkMacaoServiceZone() {
|
||||||
|
HkOrderStatsVO emptyOrderStats = HkOrderStatsVO.builder()
|
||||||
|
.totalOrders(0L).unit("").momGrowth("").trend("").build();
|
||||||
|
return HkMacaoServiceZoneVO.builder()
|
||||||
|
.warehouseOrderStats(emptyOrderStats)
|
||||||
|
.clientServiceStats(HkClientServiceStatsVO.builder()
|
||||||
|
.hkMacaoClients(0).clientRatio("").warehouseUsageArea("").areaRatio("").build())
|
||||||
|
.goodsSourceStats(HkRingChartStatsVO.builder()
|
||||||
|
.totalOrders(0).details(Collections.emptyList()).build())
|
||||||
|
.crossBorderOrderStats(HkRingChartStatsVO.builder()
|
||||||
|
.totalOrders(0).details(Collections.emptyList()).build())
|
||||||
|
.warehouseOrderTrend(Collections.emptyList())
|
||||||
|
.inventoryTurnoverTrend(HkInventoryTurnoverTrendVO.builder()
|
||||||
|
.currentMonthRate("").annualRate("").unit("").data(Collections.emptyList()).build())
|
||||||
|
.transportOrderStats(emptyOrderStats)
|
||||||
|
.doorToDoorEfficiency(HkDoorToDoorEfficiencyVO.builder()
|
||||||
|
.averageTime("").fastestTime("").momGrowth("").build())
|
||||||
|
.crossBorderTransportStats(HkRingChartStatsVO.builder()
|
||||||
|
.totalOrders(0).details(Collections.emptyList()).build())
|
||||||
|
.cargoVolumeTrend(Collections.emptyList())
|
||||||
|
.transportOrderTrend(Collections.emptyList())
|
||||||
|
.onTimeDeliveryRate(Collections.emptyList())
|
||||||
|
.mapData(HkMapDataVO.builder().points(Collections.emptyList()).build())
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -18,4 +18,6 @@ public interface BiSnapshotWriteMapper {
|
|||||||
int insertWarehouseOperationZoneSnapshot(@Param("payloadJson") String payloadJson, @Param("remark") String remark);
|
int insertWarehouseOperationZoneSnapshot(@Param("payloadJson") String payloadJson, @Param("remark") String remark);
|
||||||
|
|
||||||
int insertTransportOperationZoneSnapshot(@Param("payloadJson") String payloadJson, @Param("remark") String remark);
|
int insertTransportOperationZoneSnapshot(@Param("payloadJson") String payloadJson, @Param("remark") String remark);
|
||||||
|
|
||||||
|
int insertHkMacaoServiceZoneSnapshot(@Param("payloadJson") String payloadJson, @Param("remark") String remark);
|
||||||
}
|
}
|
||||||
|
|||||||
+25
-1
@@ -3,12 +3,14 @@ package com.mhd.bi.domain.biSnapshotSync.service;
|
|||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.mhd.bi.domain.biSnapshotSync.repository.mapper.BiSnapshotWriteMapper;
|
import com.mhd.bi.domain.biSnapshotSync.repository.mapper.BiSnapshotWriteMapper;
|
||||||
import com.mhd.bi.domain.biSnapshotSync.support.BiSnapshotWeeklyRandomDataBuilder;
|
import com.mhd.bi.domain.biSnapshotSync.support.BiSnapshotWeeklyRandomDataBuilder;
|
||||||
|
import com.mhd.bi.domain.biHkMacaoServiceZone.support.HkMacaoServiceZoneDemoData;
|
||||||
import com.mhd.bi.domain.biTransportOperationZone.support.TransportOperationZoneDemoData;
|
import com.mhd.bi.domain.biTransportOperationZone.support.TransportOperationZoneDemoData;
|
||||||
import com.mhd.bi.domain.biWarehouseOperationZone.support.WarehouseOperationZoneDemoData;
|
import com.mhd.bi.domain.biWarehouseOperationZone.support.WarehouseOperationZoneDemoData;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.ComprehensiveSituationVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.ComprehensiveSituationVO;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.WarehouseTransportSituationVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.WarehouseTransportSituationVO;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.overall.OverallOperationSituationVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.overall.OverallOperationSituationVO;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.platform.PlatformSurveillanceVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.platform.PlatformSurveillanceVO;
|
||||||
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone.HkMacaoServiceZoneVO;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone.TransportOperationZoneVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone.TransportOperationZoneVO;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.warehouseZone.WarehouseOperationZoneVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.warehouseZone.WarehouseOperationZoneVO;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@@ -18,7 +20,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BI 快照表定时同步(综合态势 / 仓储运输 / 月台监测 / 总体运营态势 / 仓储运营专区 / 运输运营专区)。
|
* BI 快照表定时同步(综合态势 / 仓储运输 / 月台监测 / 总体运营态势 / 仓储运营专区 / 运输运营专区 / 港澳服务专区)。
|
||||||
* <p><b>当前(临时)</b>:{@code build*} 使用 {@link BiSnapshotWeeklyRandomDataBuilder},每次执行使用新的 {@link Random},
|
* <p><b>当前(临时)</b>:{@code build*} 使用 {@link BiSnapshotWeeklyRandomDataBuilder},每次执行使用新的 {@link Random},
|
||||||
* 故<b>同一天多次手动触发、以及每次定时任务执行</b>,生成的模拟数据均<b>不相同</b>(仍在基准 ±20% 内)。</p>
|
* 故<b>同一天多次手动触发、以及每次定时任务执行</b>,生成的模拟数据均<b>不相同</b>(仍在基准 ±20% 内)。</p>
|
||||||
* <p><b>后续改造</b>:在各 {@code build*} 中改为查库/Feign 聚合真实业务并组装 VO。</p>
|
* <p><b>后续改造</b>:在各 {@code build*} 中改为查库/Feign 聚合真实业务并组装 VO。</p>
|
||||||
@@ -43,6 +45,7 @@ public class BiReportSnapshotSyncService {
|
|||||||
syncOverallOperationSnapshot();
|
syncOverallOperationSnapshot();
|
||||||
syncWarehouseOperationZoneSnapshot();
|
syncWarehouseOperationZoneSnapshot();
|
||||||
syncTransportOperationZoneSnapshot();
|
syncTransportOperationZoneSnapshot();
|
||||||
|
syncHkMacaoServiceZoneSnapshot();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void syncComprehensiveSnapshot() {
|
public void syncComprehensiveSnapshot() {
|
||||||
@@ -166,4 +169,25 @@ public class BiReportSnapshotSyncService {
|
|||||||
protected TransportOperationZoneVO buildTransportOperationZoneSnapshot() {
|
protected TransportOperationZoneVO buildTransportOperationZoneSnapshot() {
|
||||||
return TransportOperationZoneDemoData.build();
|
return TransportOperationZoneDemoData.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void syncHkMacaoServiceZoneSnapshot() {
|
||||||
|
try {
|
||||||
|
HkMacaoServiceZoneVO vo = buildHkMacaoServiceZoneSnapshot();
|
||||||
|
String json = objectMapper.writeValueAsString(vo);
|
||||||
|
int rows = biSnapshotWriteMapper.insertHkMacaoServiceZoneSnapshot(json, REMARK_SYNC);
|
||||||
|
if (rows < 1) {
|
||||||
|
log.warn("BI 港澳服务专区快照 INSERT 影响行数为 {},请确认 NGWL_TEST_BI.BI_HK_MACAO_SERVICE_ZONE_SNAPSHOT", rows);
|
||||||
|
}
|
||||||
|
log.info("BI 港澳服务专区快照已写入, affectedRows={}", rows);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("BI 港澳服务专区快照同步失败", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO 业务落地:改为查询真实数据组装 VO。当前为 {@link HkMacaoServiceZoneDemoData} 静态示例。
|
||||||
|
*/
|
||||||
|
protected HkMacaoServiceZoneVO buildHkMacaoServiceZoneSnapshot() {
|
||||||
|
return HkMacaoServiceZoneDemoData.build();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-19
@@ -1,11 +1,12 @@
|
|||||||
package com.mhd.bi.domain.biSnapshotSync.support;
|
package com.mhd.bi.domain.biSnapshotSync.support;
|
||||||
|
|
||||||
|
import com.mhd.bi.domain.biReport.support.BiOnTimeDeliveryRateChartSupport;
|
||||||
|
import com.mhd.bi.domain.biReport.support.BiInventoryTurnoverTrendSupport;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.ComprehensiveSituationVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.ComprehensiveSituationVO;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.CustomerContributionRankVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.CustomerContributionRankVO;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.WarehouseTransportSituationVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.WarehouseTransportSituationVO;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.overall.*;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.overall.*;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.platform.*;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.platform.*;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@@ -242,7 +243,7 @@ public final class BiSnapshotWeeklyRandomDataBuilder {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 与产品约定返回值示例一致,供快照同步与联调。
|
* 与产品约定返回值示例一致,供快照同步与联调。
|
||||||
* {@code warehouse.capabilityRanking}、{@code transport.enterpriseRanking} 的 {@code name} 为固定展示名,不参与随机抖动。
|
* 左侧 {@code warehouse.turnover_rate_trend} 库存周转率趋势;右下角 {@code transport.on_time_rate} 准时配送率。
|
||||||
*/
|
*/
|
||||||
public static OverallOperationSituationVO overallReferenceDashboard() {
|
public static OverallOperationSituationVO overallReferenceDashboard() {
|
||||||
return OverallOperationSituationVO.builder()
|
return OverallOperationSituationVO.builder()
|
||||||
@@ -284,25 +285,19 @@ public final class BiSnapshotWeeklyRandomDataBuilder {
|
|||||||
.throughputUnit("万吨")
|
.throughputUnit("万吨")
|
||||||
.throughputGrowth(8.5)
|
.throughputGrowth(8.5)
|
||||||
.build())
|
.build())
|
||||||
.capabilityRanking(Arrays.asList(
|
.turnoverRateTrend(BiInventoryTurnoverTrendSupport.defaultTrend())
|
||||||
OverallWarehouseCapabilityRankVO.builder().rank(1).name("君华仓").processedVolume("2,400单").throughput("5.2万吨").utilizationRate("85%").build(),
|
|
||||||
OverallWarehouseCapabilityRankVO.builder().rank(2).name("通宇仓").processedVolume("1,800单").throughput("4.1万吨").utilizationRate("78%").build(),
|
|
||||||
OverallWarehouseCapabilityRankVO.builder().rank(3).name("横琴仓").processedVolume("1,200单").throughput("3.5万吨").utilizationRate("92%").build(),
|
|
||||||
OverallWarehouseCapabilityRankVO.builder().rank(4).name("新南仓").processedVolume("800单").throughput("2.2万吨").utilizationRate("65%").build(),
|
|
||||||
OverallWarehouseCapabilityRankVO.builder().rank(5).name("谷丰仓").processedVolume("567单").throughput("1.8万吨").utilizationRate("45%").build()
|
|
||||||
))
|
|
||||||
.build())
|
.build())
|
||||||
.map(OverallMapSectionVO.builder()
|
.map(OverallMapSectionVO.builder()
|
||||||
.nodes(Arrays.asList(
|
.nodes(Arrays.asList(
|
||||||
OverallMapNodeVO.builder()
|
OverallMapNodeVO.builder()
|
||||||
.type("headquarters")
|
.type("headquarters")
|
||||||
.name("总部")
|
.name("总部")
|
||||||
.location(Arrays.asList(113.3, 22.5))
|
.location(Arrays.asList(113.55, 22.25, 0.0))
|
||||||
.build(),
|
.build(),
|
||||||
OverallMapNodeVO.builder()
|
OverallMapNodeVO.builder()
|
||||||
.type("businessUnit")
|
.type("businessUnit")
|
||||||
.name("业务单元")
|
.name("业务单元")
|
||||||
.location(Arrays.asList(113.6, 22.8))
|
.location(Arrays.asList(113.55, 22.20, 0.0))
|
||||||
.tooltip(OverallMapTooltipVO.builder()
|
.tooltip(OverallMapTooltipVO.builder()
|
||||||
.title("通宇业务情况分析")
|
.title("通宇业务情况分析")
|
||||||
.data(Arrays.asList(
|
.data(Arrays.asList(
|
||||||
@@ -314,7 +309,7 @@ public final class BiSnapshotWeeklyRandomDataBuilder {
|
|||||||
OverallMapNodeVO.builder()
|
OverallMapNodeVO.builder()
|
||||||
.type("warehouse")
|
.type("warehouse")
|
||||||
.name("通宇保税仓")
|
.name("通宇保税仓")
|
||||||
.location(Arrays.asList(113.4, 22.3))
|
.location(Arrays.asList(114.16, 22.28, 0.0))
|
||||||
.tooltip(OverallMapTooltipVO.builder()
|
.tooltip(OverallMapTooltipVO.builder()
|
||||||
.title("通宇保税仓情况分析")
|
.title("通宇保税仓情况分析")
|
||||||
.data(Arrays.asList(
|
.data(Arrays.asList(
|
||||||
@@ -361,13 +356,7 @@ public final class BiSnapshotWeeklyRandomDataBuilder {
|
|||||||
.crossBorder(2400L)
|
.crossBorder(2400L)
|
||||||
.domestic(2300L)
|
.domestic(2300L)
|
||||||
.build())
|
.build())
|
||||||
.enterpriseRanking(Arrays.asList(
|
.onTimeRate(BiOnTimeDeliveryRateChartSupport.defaultChart())
|
||||||
OverallTransportEnterpriseRankVO.builder().rank(1).name("通宇").processedVolume("2,400单").freight("5.2万吨").onTimeRate("85%").build(),
|
|
||||||
OverallTransportEnterpriseRankVO.builder().rank(2).name("南岐").processedVolume("1,800单").freight("4.1万吨").onTimeRate("78%").build(),
|
|
||||||
OverallTransportEnterpriseRankVO.builder().rank(3).name("谷丰").processedVolume("1,200单").freight("3.5万吨").onTimeRate("92%").build(),
|
|
||||||
OverallTransportEnterpriseRankVO.builder().rank(4).name("仓码").processedVolume("800单").freight("2.2万吨").onTimeRate("65%").build(),
|
|
||||||
OverallTransportEnterpriseRankVO.builder().rank(5).name("横琴").processedVolume("567单").freight("1.8万吨").onTimeRate("45%").build()
|
|
||||||
))
|
|
||||||
.build())
|
.build())
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-3
@@ -2,17 +2,18 @@ package com.mhd.bi.domain.biTransportOperationZone.repository.mapper;
|
|||||||
|
|
||||||
import com.mhd.bi.domain.biReport.support.BiReportSnapshotMapperSupport;
|
import com.mhd.bi.domain.biReport.support.BiReportSnapshotMapperSupport;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone.TransportOperationZoneVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone.TransportOperationZoneVO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 运输运营专区:取 NGWL_TEST_BI.BI_TRANSPORT_OPERATION_ZONE_SNAPSHOT 最新 PAYLOAD_JSON 并解析。
|
* 运输运营专区:取 NGWL_TEST_BI.BI_TRANSPORT_OPERATION_ZONE_SNAPSHOT 最新 PAYLOAD_JSON 并解析。
|
||||||
*/
|
*/
|
||||||
public interface BiTransportOperationZoneReportMapper {
|
public interface BiTransportOperationZoneReportMapper {
|
||||||
|
|
||||||
String selectLatestPayloadJson();
|
String selectLatestPayloadJson(@Param("organizationName") String organizationName);
|
||||||
|
|
||||||
default TransportOperationZoneVO loadLatestTransportOperationZone() {
|
default TransportOperationZoneVO loadTransportOperationZone(String organizationName) {
|
||||||
return BiReportSnapshotMapperSupport.parsePayload(
|
return BiReportSnapshotMapperSupport.parsePayload(
|
||||||
selectLatestPayloadJson(),
|
selectLatestPayloadJson(organizationName),
|
||||||
TransportOperationZoneVO.class,
|
TransportOperationZoneVO.class,
|
||||||
BiReportSnapshotMapperSupport::emptyTransportOperationZone,
|
BiReportSnapshotMapperSupport::emptyTransportOperationZone,
|
||||||
"运输运营专区");
|
"运输运营专区");
|
||||||
|
|||||||
+6
-2
@@ -2,6 +2,7 @@ package com.mhd.bi.domain.biTransportOperationZone.service;
|
|||||||
|
|
||||||
import com.mhd.bi.domain.biTransportOperationZone.repository.mapper.BiTransportOperationZoneReportMapper;
|
import com.mhd.bi.domain.biTransportOperationZone.repository.mapper.BiTransportOperationZoneReportMapper;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone.TransportOperationZoneVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone.TransportOperationZoneVO;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@@ -15,7 +16,10 @@ public class BiTransportOperationZoneReportService {
|
|||||||
@Resource
|
@Resource
|
||||||
private BiTransportOperationZoneReportMapper biTransportOperationZoneReportMapper;
|
private BiTransportOperationZoneReportMapper biTransportOperationZoneReportMapper;
|
||||||
|
|
||||||
public TransportOperationZoneVO loadLatestTransportOperationZone() {
|
/**
|
||||||
return biTransportOperationZoneReportMapper.loadLatestTransportOperationZone();
|
* @param organizationName 企业运营/组织名称(模糊匹配),为空时取全表最新一条
|
||||||
|
*/
|
||||||
|
public TransportOperationZoneVO loadTransportOperationZone(String organizationName) {
|
||||||
|
return biTransportOperationZoneReportMapper.loadTransportOperationZone(StringUtils.trimToNull(organizationName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+45
-5
@@ -55,11 +55,11 @@ public final class TransportOperationZoneDemoData {
|
|||||||
);
|
);
|
||||||
|
|
||||||
List<TrEnterpriseRowVO> enterpriseList = Arrays.asList(
|
List<TrEnterpriseRowVO> enterpriseList = Arrays.asList(
|
||||||
row("NO.1", "供应商A", "268.25万", "2400单", 95),
|
row("NO.1", "通宇", "268.25万", "2400单", 95),
|
||||||
row("NO.2", "供应商B", "258.15万", "1800单", 98),
|
row("NO.2", "南岐", "258.15万", "1800单", 98),
|
||||||
row("NO.3", "供应商C", "242.32万", "1200单", 13),
|
row("NO.3", "谷丰", "242.32万", "1200单", 13),
|
||||||
row("NO.4", "供应商D", "231.54万", "800单", 12),
|
row("NO.4", "仓码", "231.54万", "800单", 12),
|
||||||
row("NO.5", "供应商E", "220.90万", "567单", 15)
|
row("NO.5", "横琴", "220.90万", "567单", 15)
|
||||||
);
|
);
|
||||||
|
|
||||||
List<TrCargoCategoryItemVO> cargoItems = Arrays.asList(
|
List<TrCargoCategoryItemVO> cargoItems = Arrays.asList(
|
||||||
@@ -68,6 +68,12 @@ public final class TransportOperationZoneDemoData {
|
|||||||
TrCargoCategoryItemVO.builder().name("冻品").value(50).color("orange").build()
|
TrCargoCategoryItemVO.builder().name("冻品").value(50).color("orange").build()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
List<TrCargoTypeDetailVO> cargoTypeDetails = Arrays.asList(
|
||||||
|
TrCargoTypeDetailVO.builder().typeCode("2").name("第2类 气体").percentage("65%").color("#1890FF").build(),
|
||||||
|
TrCargoTypeDetailVO.builder().typeCode("3").name("第3类 易燃液体").percentage("25%").color("#52C41A").build(),
|
||||||
|
TrCargoTypeDetailVO.builder().typeCode("8").name("第8类 腐蚀性物质").percentage("15%").color("#FAAD14").build()
|
||||||
|
);
|
||||||
|
|
||||||
TrMapNodeVO mapNode = TrMapNodeVO.builder()
|
TrMapNodeVO mapNode = TrMapNodeVO.builder()
|
||||||
.id(1L)
|
.id(1L)
|
||||||
.name("通宇作业车辆")
|
.name("通宇作业车辆")
|
||||||
@@ -138,9 +144,43 @@ public final class TransportOperationZoneDemoData {
|
|||||||
.safeMileage("240万公里")
|
.safeMileage("240万公里")
|
||||||
.avgDeliveryTime("平均4小时送达")
|
.avgDeliveryTime("平均4小时送达")
|
||||||
.build())
|
.build())
|
||||||
|
.capacityStats(TrCapacityStatsVO.builder()
|
||||||
|
.vehicles(capacityStatItem(280, "辆", "车辆"))
|
||||||
|
.drivers(capacityStatItem(360, "人", "驾驶员"))
|
||||||
|
.escorts(capacityStatItem(56, "人", "押运员"))
|
||||||
|
.build())
|
||||||
|
.cargoTypeDistribution(TrCargoTypeDistributionVO.builder()
|
||||||
|
.title("货物类型分布")
|
||||||
|
.totalOrders(1000)
|
||||||
|
.totalUnit("单")
|
||||||
|
.details(cargoTypeDetails)
|
||||||
|
.build())
|
||||||
|
.freshOrderStats(sampleBrandOrderStats())
|
||||||
|
.vitasoyOrderStats(sampleBrandOrderStats())
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static TrBrandOrderStatsVO sampleBrandOrderStats() {
|
||||||
|
return TrBrandOrderStatsVO.builder()
|
||||||
|
.plannedDelivery(orderStatMetric(2135, "单", "计划配送"))
|
||||||
|
.orderQuantity(orderStatMetric(228, "万吨", "订单数量"))
|
||||||
|
.vehiclesInTransit(orderStatMetric(84, "辆", "在途车辆"))
|
||||||
|
.completedDelivery(TrOrderStatTextMetricVO.builder()
|
||||||
|
.value("22.8%").unit("").label("完成配送").build())
|
||||||
|
.overtimeDelivery(orderStatMetric(228, "单", "超时配送"))
|
||||||
|
.onTimeRate(TrOrderStatRateMetricVO.builder()
|
||||||
|
.value("85%").trend("+30%").label("准时配送率").build())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static TrOrderStatMetricVO orderStatMetric(int value, String unit, String label) {
|
||||||
|
return TrOrderStatMetricVO.builder().value(value).unit(unit).label(label).build();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static TrCapacityStatItemVO capacityStatItem(int value, String unit, String label) {
|
||||||
|
return TrCapacityStatItemVO.builder().value(value).unit(unit).label(label).build();
|
||||||
|
}
|
||||||
|
|
||||||
private static TrMonthValuePointVO point(String month, int value) {
|
private static TrMonthValuePointVO point(String month, int value) {
|
||||||
return TrMonthValuePointVO.builder().month(month).value(value).build();
|
return TrMonthValuePointVO.builder().month(month).value(value).build();
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-3
@@ -2,17 +2,18 @@ package com.mhd.bi.domain.biWarehouseOperationZone.repository.mapper;
|
|||||||
|
|
||||||
import com.mhd.bi.domain.biReport.support.BiReportSnapshotMapperSupport;
|
import com.mhd.bi.domain.biReport.support.BiReportSnapshotMapperSupport;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.warehouseZone.WarehouseOperationZoneVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.warehouseZone.WarehouseOperationZoneVO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 仓储运营专区:取 NGWL_TEST_BI.BI_WAREHOUSE_OPERATION_ZONE_SNAPSHOT 最新 PAYLOAD_JSON 并解析。
|
* 仓储运营专区:取 NGWL_TEST_BI.BI_WAREHOUSE_OPERATION_ZONE_SNAPSHOT 最新 PAYLOAD_JSON 并解析。
|
||||||
*/
|
*/
|
||||||
public interface BiWarehouseOperationZoneReportMapper {
|
public interface BiWarehouseOperationZoneReportMapper {
|
||||||
|
|
||||||
String selectLatestPayloadJson();
|
String selectLatestPayloadJson(@Param("organizationName") String organizationName);
|
||||||
|
|
||||||
default WarehouseOperationZoneVO loadLatestWarehouseOperationZone() {
|
default WarehouseOperationZoneVO loadWarehouseOperationZone(String organizationName) {
|
||||||
return BiReportSnapshotMapperSupport.parsePayload(
|
return BiReportSnapshotMapperSupport.parsePayload(
|
||||||
selectLatestPayloadJson(),
|
selectLatestPayloadJson(organizationName),
|
||||||
WarehouseOperationZoneVO.class,
|
WarehouseOperationZoneVO.class,
|
||||||
BiReportSnapshotMapperSupport::emptyWarehouseOperationZone,
|
BiReportSnapshotMapperSupport::emptyWarehouseOperationZone,
|
||||||
"仓储运营专区");
|
"仓储运营专区");
|
||||||
|
|||||||
+6
-2
@@ -2,6 +2,7 @@ package com.mhd.bi.domain.biWarehouseOperationZone.service;
|
|||||||
|
|
||||||
import com.mhd.bi.domain.biWarehouseOperationZone.repository.mapper.BiWarehouseOperationZoneReportMapper;
|
import com.mhd.bi.domain.biWarehouseOperationZone.repository.mapper.BiWarehouseOperationZoneReportMapper;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.warehouseZone.WarehouseOperationZoneVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.warehouseZone.WarehouseOperationZoneVO;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@@ -15,7 +16,10 @@ public class BiWarehouseOperationZoneReportService {
|
|||||||
@Resource
|
@Resource
|
||||||
private BiWarehouseOperationZoneReportMapper biWarehouseOperationZoneReportMapper;
|
private BiWarehouseOperationZoneReportMapper biWarehouseOperationZoneReportMapper;
|
||||||
|
|
||||||
public WarehouseOperationZoneVO loadLatestWarehouseOperationZone() {
|
/**
|
||||||
return biWarehouseOperationZoneReportMapper.loadLatestWarehouseOperationZone();
|
* @param organizationName 企业运营/组织名称(模糊匹配),为空时取全表最新一条
|
||||||
|
*/
|
||||||
|
public WarehouseOperationZoneVO loadWarehouseOperationZone(String organizationName) {
|
||||||
|
return biWarehouseOperationZoneReportMapper.loadWarehouseOperationZone(StringUtils.trimToNull(organizationName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+46
@@ -68,6 +68,20 @@ public final class WarehouseOperationZoneDemoData {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return WarehouseOperationZoneVO.builder()
|
return WarehouseOperationZoneVO.builder()
|
||||||
|
.warehouseName("新南仓")
|
||||||
|
.updateTime("2026-04-16 18:41:00")
|
||||||
|
.orderSummary(WhOrderSummaryVO.builder()
|
||||||
|
.totalCount("03600")
|
||||||
|
.inboundOrders(orderSummaryItem("入库单", 2298))
|
||||||
|
.outboundOrders(orderSummaryItem("出库单", 1129))
|
||||||
|
.operationOrders(orderSummaryItem("作业单", 345))
|
||||||
|
.build())
|
||||||
|
.coldStorageStats(WhColdStorageStatsVO.builder()
|
||||||
|
.revenueShare(coldMetric("64.8%", "+30%"))
|
||||||
|
.utilizationRate(coldMetric("28.6%", "+30%"))
|
||||||
|
.damageRate(coldMetric("1.6%", "+30%"))
|
||||||
|
.build())
|
||||||
|
.temperatureExceptions(sampleTemperatureExceptions())
|
||||||
.storageOverview(WhStorageOverviewVO.builder()
|
.storageOverview(WhStorageOverviewVO.builder()
|
||||||
.title("仓储面积")
|
.title("仓储面积")
|
||||||
.value(10)
|
.value(10)
|
||||||
@@ -144,6 +158,38 @@ public final class WarehouseOperationZoneDemoData {
|
|||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static WhOrderSummaryCountItemVO orderSummaryItem(String label, int value) {
|
||||||
|
return WhOrderSummaryCountItemVO.builder().label(label).value(value).build();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static WhColdStorageMetricVO coldMetric(String value, String trend) {
|
||||||
|
return WhColdStorageMetricVO.builder().value(value).trend(trend).build();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static List<WhTemperatureExceptionVO> sampleTemperatureExceptions() {
|
||||||
|
return Arrays.asList(
|
||||||
|
tempException(1, "I级"),
|
||||||
|
tempException(2, "II级"),
|
||||||
|
tempException(3, "II级"),
|
||||||
|
tempException(4, "II级"),
|
||||||
|
tempException(5, "IV级"),
|
||||||
|
tempException(6, "IV级"),
|
||||||
|
tempException(7, "IV级")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static WhTemperatureExceptionVO tempException(int rank, String level) {
|
||||||
|
return WhTemperatureExceptionVO.builder()
|
||||||
|
.rank(rank)
|
||||||
|
.level(level)
|
||||||
|
.area("A1区")
|
||||||
|
.deviceId("01020304")
|
||||||
|
.temperature("-4°C")
|
||||||
|
.duration("持续0小时12分钟")
|
||||||
|
.occurTime("04-16 18:41")
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
private static WhMapNodeVO mapNode(long id, String name, double lng, double lat,
|
private static WhMapNodeVO mapNode(long id, String name, double lng, double lat,
|
||||||
String warehouseName, String totalArea, int totalSku,
|
String warehouseName, String totalArea, int totalSku,
|
||||||
int todayOrders, String utilizationRate, String rentalRate) {
|
int todayOrders, String utilizationRate, String rentalRate) {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.mhd.bi.domain.biSnapshotSync.service.BiReportSnapshotSyncService;
|
|||||||
import com.mhd.bi.domain.biComprehensive.service.BiComprehensiveReportService;
|
import com.mhd.bi.domain.biComprehensive.service.BiComprehensiveReportService;
|
||||||
import com.mhd.bi.domain.biPlatformSurveillance.service.BiPlatformSurveillanceReportService;
|
import com.mhd.bi.domain.biPlatformSurveillance.service.BiPlatformSurveillanceReportService;
|
||||||
import com.mhd.bi.domain.biOverallOperation.service.BiOverallOperationReportService;
|
import com.mhd.bi.domain.biOverallOperation.service.BiOverallOperationReportService;
|
||||||
|
import com.mhd.bi.domain.biHkMacaoServiceZone.service.BiHkMacaoServiceZoneReportService;
|
||||||
import com.mhd.bi.domain.biTransportOperationZone.service.BiTransportOperationZoneReportService;
|
import com.mhd.bi.domain.biTransportOperationZone.service.BiTransportOperationZoneReportService;
|
||||||
import com.mhd.bi.domain.biWarehouseOperationZone.service.BiWarehouseOperationZoneReportService;
|
import com.mhd.bi.domain.biWarehouseOperationZone.service.BiWarehouseOperationZoneReportService;
|
||||||
import com.mhd.bi.domain.biWarehouseTransport.service.BiWarehouseTransportReportService;
|
import com.mhd.bi.domain.biWarehouseTransport.service.BiWarehouseTransportReportService;
|
||||||
@@ -12,17 +13,20 @@ import com.mhd.bi.interfaces.facadeApi.biReport.vo.ComprehensiveSituationVO;
|
|||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.WarehouseTransportSituationVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.WarehouseTransportSituationVO;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.overall.OverallOperationSituationVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.overall.OverallOperationSituationVO;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.platform.PlatformSurveillanceVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.platform.PlatformSurveillanceVO;
|
||||||
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone.HkMacaoServiceZoneVO;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone.TransportOperationZoneVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone.TransportOperationZoneVO;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.warehouseZone.WarehouseOperationZoneVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.warehouseZone.WarehouseOperationZoneVO;
|
||||||
import com.mhd.common.core.web.controller.BaseController;
|
import com.mhd.common.core.web.controller.BaseController;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.annotations.ApiParam;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -53,11 +57,14 @@ public class BiReportApi extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private BiTransportOperationZoneReportService biTransportOperationZoneReportService;
|
private BiTransportOperationZoneReportService biTransportOperationZoneReportService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BiHkMacaoServiceZoneReportService biHkMacaoServiceZoneReportService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private BiReportSnapshotSyncService biReportSnapshotSyncService;
|
private BiReportSnapshotSyncService biReportSnapshotSyncService;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "手动触发快照同步", notes = "立即写入各 BI 快照表(综合、仓储运输、月台监测、总体运营、仓储运营专区、运输运营专区);须带 X-BI-Access-Token")
|
@ApiOperation(value = "手动触发快照同步", notes = "立即写入各 BI 快照表(综合、仓储运输、月台监测、总体运营、仓储运营专区、运输运营专区、港澳服务专区);须带 X-BI-Access-Token")
|
||||||
@PostMapping("/snapshotSync/run")
|
@PostMapping("/snapshotSync/run")
|
||||||
public BiApiResult<Void> runSnapshotSyncOnce() {
|
public BiApiResult<Void> runSnapshotSyncOnce() {
|
||||||
biReportSnapshotSyncService.syncAllSnapshots();
|
biReportSnapshotSyncService.syncAllSnapshots();
|
||||||
@@ -107,20 +114,34 @@ public class BiReportApi extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 仓储运营专区(大屏「仓储运营专区」Tab)
|
* 仓储运营专区(大屏「仓储运营专区」Tab)
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "仓储运营专区查询", notes = "返回 DEL_FLAG=1 且 CREATE_TIME 最新的一条整包 JSON 解析结果")
|
@ApiOperation(value = "仓储运营专区查询", notes = "未传 organizationName 时返回全表最新一条;")
|
||||||
@GetMapping("/warehouseOperationZone")
|
@GetMapping("/warehouseOperationZone")
|
||||||
public BiApiResult<WarehouseOperationZoneVO> warehouseOperationZone() {
|
public BiApiResult<WarehouseOperationZoneVO> warehouseOperationZone(
|
||||||
WarehouseOperationZoneVO data = biWarehouseOperationZoneReportService.loadLatestWarehouseOperationZone();
|
@ApiParam(value = "企业运营/组织名称")
|
||||||
|
@RequestParam(value = "organizationName", required = false) String organizationName) {
|
||||||
|
WarehouseOperationZoneVO data = biWarehouseOperationZoneReportService.loadWarehouseOperationZone(organizationName);
|
||||||
return BiApiResult.ok(data);
|
return BiApiResult.ok(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 运输运营专区(大屏「运输运营专区」Tab)
|
* 运输运营专区(大屏「运输运营专区」Tab)
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "运输运营专区查询", notes = "返回 DEL_FLAG=1 且 CREATE_TIME 最新的一条整包 JSON 解析结果")
|
@ApiOperation(value = "运输运营专区查询", notes = "未传 organizationName 时返回全表最新一条;传入时双向模糊匹配 ORGANIZATION_NAME(库名包含关键词,或关键词包含库名)")
|
||||||
@GetMapping("/transportOperationZone")
|
@GetMapping("/transportOperationZone")
|
||||||
public BiApiResult<TransportOperationZoneVO> transportOperationZone() {
|
public BiApiResult<TransportOperationZoneVO> transportOperationZone(
|
||||||
TransportOperationZoneVO data = biTransportOperationZoneReportService.loadLatestTransportOperationZone();
|
@ApiParam(value = "企业运营/组织名称,与快照表 ORGANIZATION_NAME 双向模糊匹配")
|
||||||
|
@RequestParam(value = "organizationName", required = false) String organizationName) {
|
||||||
|
TransportOperationZoneVO data = biTransportOperationZoneReportService.loadTransportOperationZone(organizationName);
|
||||||
|
return BiApiResult.ok(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 港澳服务专区(大屏「港澳服务专区」)
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "港澳服务专区查询", notes = "返回 DEL_FLAG=1 且 CREATE_TIME 最新的一条整包 JSON 解析结果")
|
||||||
|
@GetMapping("/hkMacaoServiceZone")
|
||||||
|
public BiApiResult<HkMacaoServiceZoneVO> hkMacaoServiceZone() {
|
||||||
|
HkMacaoServiceZoneVO data = biHkMacaoServiceZoneReportService.loadLatestHkMacaoServiceZone();
|
||||||
return BiApiResult.ok(data);
|
return BiApiResult.ok(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+33
@@ -0,0 +1,33 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel("BI-港澳服务专区-服务客户统计")
|
||||||
|
public class HkClientServiceStatsVO {
|
||||||
|
|
||||||
|
@JsonProperty("hk_macao_clients")
|
||||||
|
@ApiModelProperty("港澳客户数")
|
||||||
|
private Integer hkMacaoClients;
|
||||||
|
|
||||||
|
@JsonProperty("client_ratio")
|
||||||
|
@ApiModelProperty("客户占比")
|
||||||
|
private String clientRatio;
|
||||||
|
|
||||||
|
@JsonProperty("warehouse_usage_area")
|
||||||
|
@ApiModelProperty("仓库使用面积")
|
||||||
|
private String warehouseUsageArea;
|
||||||
|
|
||||||
|
@JsonProperty("area_ratio")
|
||||||
|
@ApiModelProperty("面积占比")
|
||||||
|
private String areaRatio;
|
||||||
|
}
|
||||||
+29
@@ -0,0 +1,29 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel("BI-港澳服务专区-门到门时效")
|
||||||
|
public class HkDoorToDoorEfficiencyVO {
|
||||||
|
|
||||||
|
@JsonProperty("average_time")
|
||||||
|
@ApiModelProperty("平均时效")
|
||||||
|
private String averageTime;
|
||||||
|
|
||||||
|
@JsonProperty("fastest_time")
|
||||||
|
@ApiModelProperty("最快时效")
|
||||||
|
private String fastestTime;
|
||||||
|
|
||||||
|
@JsonProperty("mom_growth")
|
||||||
|
@ApiModelProperty("环比增幅")
|
||||||
|
private String momGrowth;
|
||||||
|
}
|
||||||
+33
@@ -0,0 +1,33 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel("BI-港澳服务专区-库存周转率趋势")
|
||||||
|
public class HkInventoryTurnoverTrendVO {
|
||||||
|
|
||||||
|
@JsonProperty("current_month_rate")
|
||||||
|
@ApiModelProperty("本月周转率")
|
||||||
|
private String currentMonthRate;
|
||||||
|
|
||||||
|
@JsonProperty("annual_rate")
|
||||||
|
@ApiModelProperty("年度周转率")
|
||||||
|
private String annualRate;
|
||||||
|
|
||||||
|
@ApiModelProperty("单位")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
@ApiModelProperty("按月序列")
|
||||||
|
private List<HkMonthRatePointVO> data;
|
||||||
|
}
|
||||||
+74
@@ -0,0 +1,74 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 港澳服务专区(整包 data 与快照 PAYLOAD_JSON 一致)
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel("BI-港澳服务专区")
|
||||||
|
public class HkMacaoServiceZoneVO {
|
||||||
|
|
||||||
|
@JsonProperty("warehouse_order_stats")
|
||||||
|
@ApiModelProperty("仓库订单统计")
|
||||||
|
private HkOrderStatsVO warehouseOrderStats;
|
||||||
|
|
||||||
|
@JsonProperty("client_service_stats")
|
||||||
|
@ApiModelProperty("服务客户统计")
|
||||||
|
private HkClientServiceStatsVO clientServiceStats;
|
||||||
|
|
||||||
|
@JsonProperty("goods_source_stats")
|
||||||
|
@ApiModelProperty("货物品类来源")
|
||||||
|
private HkRingChartStatsVO goodsSourceStats;
|
||||||
|
|
||||||
|
@JsonProperty("cross_border_order_stats")
|
||||||
|
@ApiModelProperty("跨境订单统计")
|
||||||
|
private HkRingChartStatsVO crossBorderOrderStats;
|
||||||
|
|
||||||
|
@JsonProperty("warehouse_order_trend")
|
||||||
|
@ApiModelProperty("仓库订单趋势")
|
||||||
|
private List<HkOrderTrendMonthVO> warehouseOrderTrend;
|
||||||
|
|
||||||
|
@JsonProperty("inventory_turnover_trend")
|
||||||
|
@ApiModelProperty("库存周转率趋势")
|
||||||
|
private HkInventoryTurnoverTrendVO inventoryTurnoverTrend;
|
||||||
|
|
||||||
|
@JsonProperty("transport_order_stats")
|
||||||
|
@ApiModelProperty("运输订单统计")
|
||||||
|
private HkOrderStatsVO transportOrderStats;
|
||||||
|
|
||||||
|
@JsonProperty("door_to_door_efficiency")
|
||||||
|
@ApiModelProperty("门到门时效")
|
||||||
|
private HkDoorToDoorEfficiencyVO doorToDoorEfficiency;
|
||||||
|
|
||||||
|
@JsonProperty("cross_border_transport_stats")
|
||||||
|
@ApiModelProperty("跨境运输订单")
|
||||||
|
private HkRingChartStatsVO crossBorderTransportStats;
|
||||||
|
|
||||||
|
@JsonProperty("cargo_volume_trend")
|
||||||
|
@ApiModelProperty("货量趋势")
|
||||||
|
private List<HkMonthValuePointVO> cargoVolumeTrend;
|
||||||
|
|
||||||
|
@JsonProperty("transport_order_trend")
|
||||||
|
@ApiModelProperty("运输订单趋势")
|
||||||
|
private List<HkOrderTrendMonthVO> transportOrderTrend;
|
||||||
|
|
||||||
|
@JsonProperty("on_time_delivery_rate")
|
||||||
|
@ApiModelProperty("准时交付率")
|
||||||
|
private List<HkMonthRatePointVO> onTimeDeliveryRate;
|
||||||
|
|
||||||
|
@JsonProperty("map_data")
|
||||||
|
@ApiModelProperty("地图点位")
|
||||||
|
private HkMapDataVO mapData;
|
||||||
|
}
|
||||||
+21
@@ -0,0 +1,21 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel("BI-港澳服务专区-地图数据")
|
||||||
|
public class HkMapDataVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("点位列表")
|
||||||
|
private List<HkMapPointVO> points;
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel("BI-港澳服务专区-地图坐标")
|
||||||
|
public class HkMapLocationVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("纬度")
|
||||||
|
private Double lat;
|
||||||
|
|
||||||
|
@ApiModelProperty("经度")
|
||||||
|
private Double lng;
|
||||||
|
}
|
||||||
+37
@@ -0,0 +1,37 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel("BI-港澳服务专区-地图点位")
|
||||||
|
public class HkMapPointVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("点位ID")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty("类型 warehouse/vehicle")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
@ApiModelProperty("名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty("状态")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
@ApiModelProperty("坐标")
|
||||||
|
private HkMapLocationVO location;
|
||||||
|
|
||||||
|
@ApiModelProperty("仓库指标(type=warehouse)")
|
||||||
|
private HkWarehouseMetricsVO metrics;
|
||||||
|
|
||||||
|
@ApiModelProperty("车辆详情(type=vehicle)")
|
||||||
|
private HkVehicleDetailsVO details;
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel("BI-港澳服务专区-月份比率点")
|
||||||
|
public class HkMonthRatePointVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("月份")
|
||||||
|
private String month;
|
||||||
|
|
||||||
|
@ApiModelProperty("比率或趋势值")
|
||||||
|
private Integer rate;
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel("BI-港澳服务专区-月度数值点")
|
||||||
|
public class HkMonthValuePointVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("月份")
|
||||||
|
private String month;
|
||||||
|
|
||||||
|
@ApiModelProperty("数值")
|
||||||
|
private Integer value;
|
||||||
|
}
|
||||||
+31
@@ -0,0 +1,31 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel("BI-港澳服务专区-订单统计")
|
||||||
|
public class HkOrderStatsVO {
|
||||||
|
|
||||||
|
@JsonProperty("total_orders")
|
||||||
|
@ApiModelProperty("订单总量")
|
||||||
|
private Long totalOrders;
|
||||||
|
|
||||||
|
@ApiModelProperty("单位")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
@JsonProperty("mom_growth")
|
||||||
|
@ApiModelProperty("环比增幅")
|
||||||
|
private String momGrowth;
|
||||||
|
|
||||||
|
@ApiModelProperty("趋势 up/down")
|
||||||
|
private String trend;
|
||||||
|
}
|
||||||
+28
@@ -0,0 +1,28 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel("BI-港澳服务专区-订单趋势月度点")
|
||||||
|
public class HkOrderTrendMonthVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("月份")
|
||||||
|
private String month;
|
||||||
|
|
||||||
|
@JsonProperty("order_ratio")
|
||||||
|
@ApiModelProperty("订单比率/柱值")
|
||||||
|
private Integer orderRatio;
|
||||||
|
|
||||||
|
@JsonProperty("order_count")
|
||||||
|
@ApiModelProperty("订单数")
|
||||||
|
private Integer orderCount;
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel("BI-港澳服务专区-占比明细")
|
||||||
|
public class HkPercentageDetailVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty("占比")
|
||||||
|
private String percentage;
|
||||||
|
}
|
||||||
+26
@@ -0,0 +1,26 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel("BI-港澳服务专区-环形图统计")
|
||||||
|
public class HkRingChartStatsVO {
|
||||||
|
|
||||||
|
@JsonProperty("total_orders")
|
||||||
|
@ApiModelProperty("订单/统计总量")
|
||||||
|
private Integer totalOrders;
|
||||||
|
|
||||||
|
@ApiModelProperty("明细")
|
||||||
|
private List<HkPercentageDetailVO> details;
|
||||||
|
}
|
||||||
+41
@@ -0,0 +1,41 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel("BI-港澳服务专区-车辆详情")
|
||||||
|
public class HkVehicleDetailsVO {
|
||||||
|
|
||||||
|
@JsonProperty("warehouse_name")
|
||||||
|
@ApiModelProperty("关联仓库")
|
||||||
|
private String warehouseName;
|
||||||
|
|
||||||
|
@JsonProperty("license_plate")
|
||||||
|
@ApiModelProperty("车牌号")
|
||||||
|
private String licensePlate;
|
||||||
|
|
||||||
|
@JsonProperty("loading_address")
|
||||||
|
@ApiModelProperty("装货地址")
|
||||||
|
private String loadingAddress;
|
||||||
|
|
||||||
|
@JsonProperty("destination_address")
|
||||||
|
@ApiModelProperty("目的地")
|
||||||
|
private String destinationAddress;
|
||||||
|
|
||||||
|
@JsonProperty("current_location")
|
||||||
|
@ApiModelProperty("当前位置")
|
||||||
|
private String currentLocation;
|
||||||
|
|
||||||
|
@JsonProperty("update_time")
|
||||||
|
@ApiModelProperty("更新时间")
|
||||||
|
private String updateTime;
|
||||||
|
}
|
||||||
+25
@@ -0,0 +1,25 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel("BI-港澳服务专区-仓库运营指标")
|
||||||
|
public class HkWarehouseMetricsVO {
|
||||||
|
|
||||||
|
@JsonProperty("inbound_operations")
|
||||||
|
@ApiModelProperty("入库作业数")
|
||||||
|
private Integer inboundOperations;
|
||||||
|
|
||||||
|
@JsonProperty("outbound_operations")
|
||||||
|
@ApiModelProperty("出库作业数")
|
||||||
|
private Integer outboundOperations;
|
||||||
|
}
|
||||||
-31
@@ -1,31 +0,0 @@
|
|||||||
package com.mhd.bi.interfaces.facadeApi.biReport.vo.overall;
|
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@Builder
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
@ApiModel("运输-企业排行榜行")
|
|
||||||
public class OverallTransportEnterpriseRankVO {
|
|
||||||
|
|
||||||
@ApiModelProperty("排名")
|
|
||||||
private Integer rank;
|
|
||||||
|
|
||||||
@ApiModelProperty("企业名称")
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
@ApiModelProperty("处理量文案")
|
|
||||||
private String processedVolume;
|
|
||||||
|
|
||||||
@ApiModelProperty("货运量文案")
|
|
||||||
private String freight;
|
|
||||||
|
|
||||||
@ApiModelProperty("准时率文案")
|
|
||||||
private String onTimeRate;
|
|
||||||
}
|
|
||||||
+7
-2
@@ -1,5 +1,8 @@
|
|||||||
package com.mhd.bi.interfaces.facadeApi.biReport.vo.overall;
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.overall;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone.TrTypedChartVO;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
@@ -14,6 +17,7 @@ import java.util.List;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@ApiModel("总体运营态势-运输运营")
|
@ApiModel("总体运营态势-运输运营")
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class OverallTransportOperationVO {
|
public class OverallTransportOperationVO {
|
||||||
|
|
||||||
@ApiModelProperty("运输订单摘要")
|
@ApiModelProperty("运输订单摘要")
|
||||||
@@ -31,6 +35,7 @@ public class OverallTransportOperationVO {
|
|||||||
@ApiModelProperty("运输订单分布")
|
@ApiModelProperty("运输订单分布")
|
||||||
private OverallTransportModeDistributionVO orderDistribution;
|
private OverallTransportModeDistributionVO orderDistribution;
|
||||||
|
|
||||||
@ApiModelProperty("企业运营能力排名")
|
@JsonProperty("on_time_rate")
|
||||||
private List<OverallTransportEnterpriseRankVO> enterpriseRanking;
|
@ApiModelProperty("准时配送率(右下角,与运输运营专区 on_time_rate 结构一致)")
|
||||||
|
private TrTypedChartVO onTimeRate;
|
||||||
}
|
}
|
||||||
|
|||||||
-31
@@ -1,31 +0,0 @@
|
|||||||
package com.mhd.bi.interfaces.facadeApi.biReport.vo.overall;
|
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@Builder
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
@ApiModel("仓储-运营能力排行行")
|
|
||||||
public class OverallWarehouseCapabilityRankVO {
|
|
||||||
|
|
||||||
@ApiModelProperty("排名")
|
|
||||||
private Integer rank;
|
|
||||||
|
|
||||||
@ApiModelProperty("仓库名称")
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
@ApiModelProperty("处理量展示文案,如 2,400单")
|
|
||||||
private String processedVolume;
|
|
||||||
|
|
||||||
@ApiModelProperty("吞吐量展示文案,如 5.2万吨")
|
|
||||||
private String throughput;
|
|
||||||
|
|
||||||
@ApiModelProperty("利用率/周转等展示文案,如 85%")
|
|
||||||
private String utilizationRate;
|
|
||||||
}
|
|
||||||
+7
-2
@@ -1,5 +1,8 @@
|
|||||||
package com.mhd.bi.interfaces.facadeApi.biReport.vo.overall;
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.overall;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.warehouseZone.WhTurnoverRateTrendVO;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
@@ -14,6 +17,7 @@ import java.util.List;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@ApiModel("总体运营态势-仓储运营")
|
@ApiModel("总体运营态势-仓储运营")
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class OverallWarehouseOperationVO {
|
public class OverallWarehouseOperationVO {
|
||||||
|
|
||||||
@ApiModelProperty("仓库订单统计")
|
@ApiModelProperty("仓库订单统计")
|
||||||
@@ -31,6 +35,7 @@ public class OverallWarehouseOperationVO {
|
|||||||
@ApiModelProperty("仓库运营统计")
|
@ApiModelProperty("仓库运营统计")
|
||||||
private OverallWarehouseBizStatisticVO bizStatistics;
|
private OverallWarehouseBizStatisticVO bizStatistics;
|
||||||
|
|
||||||
@ApiModelProperty("仓库运营能力排名")
|
@JsonProperty("turnover_rate_trend")
|
||||||
private List<OverallWarehouseCapabilityRankVO> capabilityRanking;
|
@ApiModelProperty("库存周转率趋势(替代原 capabilityRanking)")
|
||||||
|
private WhTurnoverRateTrendVO turnoverRateTrend;
|
||||||
}
|
}
|
||||||
|
|||||||
+41
@@ -0,0 +1,41 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel("BI-运输运营专区-品牌订单统计块")
|
||||||
|
public class TrBrandOrderStatsVO {
|
||||||
|
|
||||||
|
@JsonProperty("planned_delivery")
|
||||||
|
@ApiModelProperty("计划配送")
|
||||||
|
private TrOrderStatMetricVO plannedDelivery;
|
||||||
|
|
||||||
|
@JsonProperty("order_quantity")
|
||||||
|
@ApiModelProperty("订单数量")
|
||||||
|
private TrOrderStatMetricVO orderQuantity;
|
||||||
|
|
||||||
|
@JsonProperty("vehicles_in_transit")
|
||||||
|
@ApiModelProperty("在途车辆")
|
||||||
|
private TrOrderStatMetricVO vehiclesInTransit;
|
||||||
|
|
||||||
|
@JsonProperty("completed_delivery")
|
||||||
|
@ApiModelProperty("完成配送")
|
||||||
|
private TrOrderStatTextMetricVO completedDelivery;
|
||||||
|
|
||||||
|
@JsonProperty("overtime_delivery")
|
||||||
|
@ApiModelProperty("超时配送")
|
||||||
|
private TrOrderStatMetricVO overtimeDelivery;
|
||||||
|
|
||||||
|
@JsonProperty("on_time_rate")
|
||||||
|
@ApiModelProperty("准时配送率")
|
||||||
|
private TrOrderStatRateMetricVO onTimeRate;
|
||||||
|
}
|
||||||
+25
@@ -0,0 +1,25 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel("BI-运输运营专区-运力统计项")
|
||||||
|
public class TrCapacityStatItemVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("数值")
|
||||||
|
private Integer value;
|
||||||
|
|
||||||
|
@ApiModelProperty("单位")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
@ApiModelProperty("标签")
|
||||||
|
private String label;
|
||||||
|
}
|
||||||
+25
@@ -0,0 +1,25 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel("BI-运输运营专区-企业运力统计")
|
||||||
|
public class TrCapacityStatsVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("车辆")
|
||||||
|
private TrCapacityStatItemVO vehicles;
|
||||||
|
|
||||||
|
@ApiModelProperty("驾驶员")
|
||||||
|
private TrCapacityStatItemVO drivers;
|
||||||
|
|
||||||
|
@ApiModelProperty("押运员")
|
||||||
|
private TrCapacityStatItemVO escorts;
|
||||||
|
}
|
||||||
+30
@@ -0,0 +1,30 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel("BI-运输运营专区-货物类型分布明细")
|
||||||
|
public class TrCargoTypeDetailVO {
|
||||||
|
|
||||||
|
@JsonProperty("type_code")
|
||||||
|
@ApiModelProperty("类型编码")
|
||||||
|
private String typeCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("类型名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty("占比")
|
||||||
|
private String percentage;
|
||||||
|
|
||||||
|
@ApiModelProperty("图表颜色")
|
||||||
|
private String color;
|
||||||
|
}
|
||||||
+33
@@ -0,0 +1,33 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel("BI-运输运营专区-货物类型分布")
|
||||||
|
public class TrCargoTypeDistributionVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@JsonProperty("total_orders")
|
||||||
|
@ApiModelProperty("订单总量")
|
||||||
|
private Integer totalOrders;
|
||||||
|
|
||||||
|
@JsonProperty("total_unit")
|
||||||
|
@ApiModelProperty("总量单位")
|
||||||
|
private String totalUnit;
|
||||||
|
|
||||||
|
@ApiModelProperty("明细")
|
||||||
|
private List<TrCargoTypeDetailVO> details;
|
||||||
|
}
|
||||||
+25
@@ -0,0 +1,25 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel("BI-运输运营专区-订单统计数值项")
|
||||||
|
public class TrOrderStatMetricVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("数值")
|
||||||
|
private Integer value;
|
||||||
|
|
||||||
|
@ApiModelProperty("单位")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
@ApiModelProperty("标签")
|
||||||
|
private String label;
|
||||||
|
}
|
||||||
+25
@@ -0,0 +1,25 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel("BI-运输运营专区-订单统计比率项")
|
||||||
|
public class TrOrderStatRateMetricVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("展示值")
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
@ApiModelProperty("环比/趋势")
|
||||||
|
private String trend;
|
||||||
|
|
||||||
|
@ApiModelProperty("标签")
|
||||||
|
private String label;
|
||||||
|
}
|
||||||
+25
@@ -0,0 +1,25 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel("BI-运输运营专区-订单统计文本项")
|
||||||
|
public class TrOrderStatTextMetricVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("展示值")
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
@ApiModelProperty("单位")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
@ApiModelProperty("标签")
|
||||||
|
private String label;
|
||||||
|
}
|
||||||
+16
@@ -77,4 +77,20 @@ public class TransportOperationZoneVO {
|
|||||||
@JsonProperty("transport_summary")
|
@JsonProperty("transport_summary")
|
||||||
@ApiModelProperty("运输统计总结")
|
@ApiModelProperty("运输统计总结")
|
||||||
private TrTransportSummaryVO transportSummary;
|
private TrTransportSummaryVO transportSummary;
|
||||||
|
|
||||||
|
@JsonProperty("capacity_stats")
|
||||||
|
@ApiModelProperty("企业运力统计")
|
||||||
|
private TrCapacityStatsVO capacityStats;
|
||||||
|
|
||||||
|
@JsonProperty("cargo_type_distribution")
|
||||||
|
@ApiModelProperty("货物类型分布")
|
||||||
|
private TrCargoTypeDistributionVO cargoTypeDistribution;
|
||||||
|
|
||||||
|
@JsonProperty("fresh_order_stats")
|
||||||
|
@ApiModelProperty("生鲜订单统计")
|
||||||
|
private TrBrandOrderStatsVO freshOrderStats;
|
||||||
|
|
||||||
|
@JsonProperty("vitasoy_order_stats")
|
||||||
|
@ApiModelProperty("维他奶订单统计")
|
||||||
|
private TrBrandOrderStatsVO vitasoyOrderStats;
|
||||||
}
|
}
|
||||||
|
|||||||
+20
@@ -20,6 +20,26 @@ import java.util.List;
|
|||||||
@ApiModel("BI-仓储运营专区")
|
@ApiModel("BI-仓储运营专区")
|
||||||
public class WarehouseOperationZoneVO {
|
public class WarehouseOperationZoneVO {
|
||||||
|
|
||||||
|
@JsonProperty("warehouse_name")
|
||||||
|
@ApiModelProperty("仓库名称")
|
||||||
|
private String warehouseName;
|
||||||
|
|
||||||
|
@JsonProperty("update_time")
|
||||||
|
@ApiModelProperty("数据更新时间")
|
||||||
|
private String updateTime;
|
||||||
|
|
||||||
|
@JsonProperty("order_summary")
|
||||||
|
@ApiModelProperty("仓库订单统计(顶部)")
|
||||||
|
private WhOrderSummaryVO orderSummary;
|
||||||
|
|
||||||
|
@JsonProperty("cold_storage_stats")
|
||||||
|
@ApiModelProperty("冻仓数据统计")
|
||||||
|
private WhColdStorageStatsVO coldStorageStats;
|
||||||
|
|
||||||
|
@JsonProperty("temperature_exceptions")
|
||||||
|
@ApiModelProperty("温度异常事件列表")
|
||||||
|
private List<WhTemperatureExceptionVO> temperatureExceptions;
|
||||||
|
|
||||||
@JsonProperty("storage_overview")
|
@JsonProperty("storage_overview")
|
||||||
@ApiModelProperty("仓储面积")
|
@ApiModelProperty("仓储面积")
|
||||||
private WhStorageOverviewVO storageOverview;
|
private WhStorageOverviewVO storageOverview;
|
||||||
|
|||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.warehouseZone;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel("BI-仓储运营专区-冻仓指标")
|
||||||
|
public class WhColdStorageMetricVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("展示值")
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
@ApiModelProperty("趋势")
|
||||||
|
private String trend;
|
||||||
|
}
|
||||||
+29
@@ -0,0 +1,29 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.warehouseZone;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel("BI-仓储运营专区-冻仓数据统计")
|
||||||
|
public class WhColdStorageStatsVO {
|
||||||
|
|
||||||
|
@JsonProperty("revenue_share")
|
||||||
|
@ApiModelProperty("收入占比")
|
||||||
|
private WhColdStorageMetricVO revenueShare;
|
||||||
|
|
||||||
|
@JsonProperty("utilization_rate")
|
||||||
|
@ApiModelProperty("利用率")
|
||||||
|
private WhColdStorageMetricVO utilizationRate;
|
||||||
|
|
||||||
|
@JsonProperty("damage_rate")
|
||||||
|
@ApiModelProperty("损耗率")
|
||||||
|
private WhColdStorageMetricVO damageRate;
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.warehouseZone;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel("BI-仓储运营专区-订单汇总项")
|
||||||
|
public class WhOrderSummaryCountItemVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("标签")
|
||||||
|
private String label;
|
||||||
|
|
||||||
|
@ApiModelProperty("数量")
|
||||||
|
private Integer value;
|
||||||
|
}
|
||||||
+33
@@ -0,0 +1,33 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.warehouseZone;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel("BI-仓储运营专区-仓库订单汇总")
|
||||||
|
public class WhOrderSummaryVO {
|
||||||
|
|
||||||
|
@JsonProperty("total_count")
|
||||||
|
@ApiModelProperty("订单总量(翻牌器)")
|
||||||
|
private String totalCount;
|
||||||
|
|
||||||
|
@JsonProperty("inbound_orders")
|
||||||
|
@ApiModelProperty("入库单")
|
||||||
|
private WhOrderSummaryCountItemVO inboundOrders;
|
||||||
|
|
||||||
|
@JsonProperty("outbound_orders")
|
||||||
|
@ApiModelProperty("出库单")
|
||||||
|
private WhOrderSummaryCountItemVO outboundOrders;
|
||||||
|
|
||||||
|
@JsonProperty("operation_orders")
|
||||||
|
@ApiModelProperty("作业单")
|
||||||
|
private WhOrderSummaryCountItemVO operationOrders;
|
||||||
|
}
|
||||||
+40
@@ -0,0 +1,40 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.warehouseZone;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ApiModel("BI-仓储运营专区-温度异常事件")
|
||||||
|
public class WhTemperatureExceptionVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("序号")
|
||||||
|
private Integer rank;
|
||||||
|
|
||||||
|
@ApiModelProperty("等级")
|
||||||
|
private String level;
|
||||||
|
|
||||||
|
@ApiModelProperty("区域")
|
||||||
|
private String area;
|
||||||
|
|
||||||
|
@JsonProperty("device_id")
|
||||||
|
@ApiModelProperty("设备编号")
|
||||||
|
private String deviceId;
|
||||||
|
|
||||||
|
@ApiModelProperty("温度")
|
||||||
|
private String temperature;
|
||||||
|
|
||||||
|
@ApiModelProperty("持续时长")
|
||||||
|
private String duration;
|
||||||
|
|
||||||
|
@JsonProperty("occur_time")
|
||||||
|
@ApiModelProperty("发生时间")
|
||||||
|
private String occurTime;
|
||||||
|
}
|
||||||
@@ -14,21 +14,21 @@ spring:
|
|||||||
discovery:
|
discovery:
|
||||||
# server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
server-addr: 10.33.0.129:6010
|
# server-addr: 10.33.0.129:6010
|
||||||
# server-addr: 10.102.192.5:6848
|
# server-addr: 10.102.192.5:6848
|
||||||
# username: nacos
|
# username: nacos
|
||||||
# password: manhuoda@2023
|
# password: manhuoda@2023
|
||||||
#线上正式环境
|
#线上正式环境
|
||||||
# server-addr: 10.102.192.5:6848
|
server-addr: 10.102.192.30:6848
|
||||||
# username: nacos
|
username: nacos
|
||||||
# password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
config:
|
config:
|
||||||
# server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
server-addr: 10.33.0.129:6010
|
# server-addr: 10.33.0.129:6010
|
||||||
# server-addr: 10.102.192.5:6848
|
server-addr: 10.102.192.30:6848
|
||||||
# username: nacos
|
username: nacos
|
||||||
# password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
#线上正式环境
|
#线上正式环境
|
||||||
group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置
|
group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置
|
||||||
file-extension: yml #默认properties
|
file-extension: yml #默认properties
|
||||||
|
|||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.mhd.bi.domain.biHkMacaoServiceZone.repository.mapper.BiHkMacaoServiceZoneReportMapper">
|
||||||
|
|
||||||
|
<select id="selectLatestPayloadJson" resultType="java.lang.String">
|
||||||
|
select PAYLOAD_JSON
|
||||||
|
from NGWL_TEST_BI.BI_HK_MACAO_SERVICE_ZONE_SNAPSHOT
|
||||||
|
where DEL_FLAG = 1
|
||||||
|
order by CREATE_TIME desc nulls last, ID desc
|
||||||
|
limit 1
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -32,4 +32,9 @@
|
|||||||
insert into NGWL_TEST_BI.BI_TRANSPORT_OPERATION_ZONE_SNAPSHOT (PAYLOAD_JSON, CREATE_TIME, UPDATE_TIME, DEL_FLAG, REMARK)
|
insert into NGWL_TEST_BI.BI_TRANSPORT_OPERATION_ZONE_SNAPSHOT (PAYLOAD_JSON, CREATE_TIME, UPDATE_TIME, DEL_FLAG, REMARK)
|
||||||
values (#{payloadJson}, SYSDATE, SYSDATE, 1, #{remark})
|
values (#{payloadJson}, SYSDATE, SYSDATE, 1, #{remark})
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertHkMacaoServiceZoneSnapshot">
|
||||||
|
insert into NGWL_TEST_BI.BI_HK_MACAO_SERVICE_ZONE_SNAPSHOT (PAYLOAD_JSON, CREATE_TIME, UPDATE_TIME, DEL_FLAG, REMARK)
|
||||||
|
values (#{payloadJson}, SYSDATE, SYSDATE, 1, #{remark})
|
||||||
|
</insert>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
+9
@@ -7,6 +7,15 @@
|
|||||||
select PAYLOAD_JSON
|
select PAYLOAD_JSON
|
||||||
from NGWL_TEST_BI.BI_TRANSPORT_OPERATION_ZONE_SNAPSHOT
|
from NGWL_TEST_BI.BI_TRANSPORT_OPERATION_ZONE_SNAPSHOT
|
||||||
where DEL_FLAG = 1
|
where DEL_FLAG = 1
|
||||||
|
<if test="organizationName != null and organizationName != ''">
|
||||||
|
and (
|
||||||
|
ORGANIZATION_NAME like '%' || #{organizationName} || '%'
|
||||||
|
or (
|
||||||
|
ORGANIZATION_NAME is not null
|
||||||
|
and INSTR(#{organizationName}, ORGANIZATION_NAME) > 0
|
||||||
|
)
|
||||||
|
)
|
||||||
|
</if>
|
||||||
order by CREATE_TIME desc nulls last, ID desc
|
order by CREATE_TIME desc nulls last, ID desc
|
||||||
limit 1
|
limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
+9
@@ -7,6 +7,15 @@
|
|||||||
select PAYLOAD_JSON
|
select PAYLOAD_JSON
|
||||||
from NGWL_TEST_BI.BI_WAREHOUSE_OPERATION_ZONE_SNAPSHOT
|
from NGWL_TEST_BI.BI_WAREHOUSE_OPERATION_ZONE_SNAPSHOT
|
||||||
where DEL_FLAG = 1
|
where DEL_FLAG = 1
|
||||||
|
<if test="organizationName != null and organizationName != ''">
|
||||||
|
and (
|
||||||
|
ORGANIZATION_NAME like '%' || #{organizationName} || '%'
|
||||||
|
or (
|
||||||
|
ORGANIZATION_NAME is not null
|
||||||
|
and INSTR(#{organizationName}, ORGANIZATION_NAME) > 0
|
||||||
|
)
|
||||||
|
)
|
||||||
|
</if>
|
||||||
order by CREATE_TIME desc nulls last, ID desc
|
order by CREATE_TIME desc nulls last, ID desc
|
||||||
limit 1
|
limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
+27
@@ -1,13 +1,19 @@
|
|||||||
package com.mhd.oms.application.service.businessDocumentCargoMulti;
|
package com.mhd.oms.application.service.businessDocumentCargoMulti;
|
||||||
|
|
||||||
|
import com.mhd.common.core.web.page.TableDataInfo;
|
||||||
|
import com.mhd.oms.domain.businessDocumentCargoMulti.repository.mapper.BusinessDocumentCargoMultiMapper;
|
||||||
import com.mhd.oms.domain.businessDocumentCargoMulti.repository.po.BusinessDocumentCargoMultiPO;
|
import com.mhd.oms.domain.businessDocumentCargoMulti.repository.po.BusinessDocumentCargoMultiPO;
|
||||||
import com.mhd.oms.domain.businessDocumentCargoMulti.repository.todo.BusinessDocumentCargoMultiDO;
|
import com.mhd.oms.domain.businessDocumentCargoMulti.repository.todo.BusinessDocumentCargoMultiDO;
|
||||||
import com.mhd.oms.domain.businessDocumentCargoMulti.service.BusinessDocumentCargoMultiDomainService;
|
import com.mhd.oms.domain.businessDocumentCargoMulti.service.BusinessDocumentCargoMultiDomainService;
|
||||||
import com.mhd.common.security.utils.SecurityUtils;
|
import com.mhd.common.security.utils.SecurityUtils;
|
||||||
|
import com.mhd.oms.domain.businessDocumentOrder.repository.po.BusinessDocumentOrderPO;
|
||||||
import com.mhd.system.api.model.LoginUser;
|
import com.mhd.system.api.model.LoginUser;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
/**
|
/**
|
||||||
* 【请填写功能名称】ApplicationService
|
* 【请填写功能名称】ApplicationService
|
||||||
@@ -21,6 +27,9 @@ public class BusinessDocumentCargoMultiApplicationService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private BusinessDocumentCargoMultiDomainService businessDocumentCargoMultiDomainService;
|
private BusinessDocumentCargoMultiDomainService businessDocumentCargoMultiDomainService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BusinessDocumentCargoMultiMapper businessDocumentCargoMultiMapper;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询【请填写功能名称】列表
|
* 分页查询【请填写功能名称】列表
|
||||||
@@ -69,4 +78,22 @@ public class BusinessDocumentCargoMultiApplicationService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public TableDataInfo getByOrderId(String orderId) {
|
||||||
|
if (orderId == null ) {
|
||||||
|
TableDataInfo tableDataInfo = new TableDataInfo();
|
||||||
|
tableDataInfo.setData(new ArrayList<>());
|
||||||
|
tableDataInfo.setTotal(0);
|
||||||
|
tableDataInfo.setCode(200);
|
||||||
|
return tableDataInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<BusinessDocumentCargoMultiPO> list = businessDocumentCargoMultiMapper.selectBatchByOrderId(orderId);
|
||||||
|
|
||||||
|
TableDataInfo tableDataInfo = new TableDataInfo();
|
||||||
|
tableDataInfo.setData(list);
|
||||||
|
tableDataInfo.setTotal(list.size());
|
||||||
|
tableDataInfo.setCode(200);
|
||||||
|
return tableDataInfo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+124
@@ -1,5 +1,6 @@
|
|||||||
package com.mhd.oms.application.service.businessDocumentOrder;
|
package com.mhd.oms.application.service.businessDocumentOrder;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.mhd.common.core.web.domain.AjaxResult;
|
import com.mhd.common.core.web.domain.AjaxResult;
|
||||||
@@ -31,6 +32,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import javax.json.JsonObject;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@@ -48,6 +50,9 @@ public class BusinessDocumentOrderApplicationService {
|
|||||||
private static final String API_NAME_I = "saveBill_i";
|
private static final String API_NAME_I = "saveBill_i";
|
||||||
private static final String API_NAME_E = "saveBill_e";
|
private static final String API_NAME_E = "saveBill_e";
|
||||||
private static final String VERIFY = "tjPZMT9fwhZRnv+eTXKF75QXmXzCn7phPagmoUQsvsh2ZTWDjuRxHAgcP0GZENHP";
|
private static final String VERIFY = "tjPZMT9fwhZRnv+eTXKF75QXmXzCn7phPagmoUQsvsh2ZTWDjuRxHAgcP0GZENHP";
|
||||||
|
private static final String API_NAME = "billAppModify";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private BusinessDocumentOrderDomainService businessDocumentOrderDomainService;
|
private BusinessDocumentOrderDomainService businessDocumentOrderDomainService;
|
||||||
@@ -297,4 +302,123 @@ public class BusinessDocumentOrderApplicationService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public AjaxResult batchPushForReviseApply(BusinessDocumentOrderDTO businessDocumentOrderDTO) {
|
||||||
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
|
Long pushBy = loginUser != null ? loginUser.getUserid() : null;
|
||||||
|
//String pushByName = loginUser != null ? loginUser.getUsername() : null;
|
||||||
|
Long organizationId = loginUser != null ? loginUser.getUserPo().getOrganizationId() : null;
|
||||||
|
Long topOrganizationId = loginUser != null ? loginUser.getUserPo().getTopOrganizationId() : null;
|
||||||
|
String organizationName = loginUser != null ? loginUser.getUserPo().getOrganizationName() : null;
|
||||||
|
|
||||||
|
int successCount = 0;
|
||||||
|
int failCount = 0;
|
||||||
|
StringBuilder failMsg = new StringBuilder();
|
||||||
|
|
||||||
|
// 构建单个对象
|
||||||
|
Map<String, String> item = new HashMap<>();
|
||||||
|
item.put("erpBillNo", String.valueOf(businessDocumentOrderDTO.getId()));
|
||||||
|
item.put("operateType", String.valueOf(businessDocumentOrderDTO.getReviseApplyType()));
|
||||||
|
item.put("appMan", businessDocumentOrderDTO.getReviseApplyBy());
|
||||||
|
item.put("appMess", businessDocumentOrderDTO.getReviseApplyReason());
|
||||||
|
|
||||||
|
// 2. 记录日志
|
||||||
|
GwLog gwLog = new GwLog();
|
||||||
|
gwLog.setType("删改单申请");
|
||||||
|
gwLog.setBusinessId(Long.valueOf(businessDocumentOrderDTO.getId()));
|
||||||
|
gwLog.setRequestBody(JSONObject.toJSONString(item));
|
||||||
|
gwLog.setResponseBody("");
|
||||||
|
gwLog.setStatus(1);
|
||||||
|
gwLog.setSendTime(new Date());
|
||||||
|
gwLog.setOrganizationId(organizationId);
|
||||||
|
gwLog.setTopOrganizationId(topOrganizationId);
|
||||||
|
gwLog.setOrganizationName(organizationName);
|
||||||
|
gwLog.setCreateBy(pushBy);
|
||||||
|
gwLog.setCreateTime(new Date());
|
||||||
|
gwLog.setDelFlag(1);
|
||||||
|
gwLogMapper.insert(gwLog);
|
||||||
|
|
||||||
|
//updateReservationOrder(businessDocumentOrderDTO);
|
||||||
|
// 3. 调用推送接口
|
||||||
|
try {
|
||||||
|
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||||
|
HttpPost httpPost = new HttpPost(PUSH_API_URL);
|
||||||
|
StringEntity postingString = new StringEntity(JSONObject.toJSONString(item), "UTF-8");
|
||||||
|
httpPost.setEntity(postingString);
|
||||||
|
|
||||||
|
httpPost.setHeader("Content-type", "application/json");
|
||||||
|
httpPost.setHeader("verify", VERIFY);
|
||||||
|
httpPost.setHeader("apiName", API_NAME);
|
||||||
|
|
||||||
|
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||||
|
String responseString = EntityUtils.toString(response.getEntity());
|
||||||
|
gwLog.setResponseBody(responseString);
|
||||||
|
|
||||||
|
if (response.getStatusLine().getStatusCode() == 200) {
|
||||||
|
JSONObject responseJson = JSONObject.parseObject(responseString);
|
||||||
|
JSONArray dataArray = responseJson.getJSONArray("data");
|
||||||
|
if(dataArray != null && dataArray.size()>0){
|
||||||
|
JSONObject dataObj = dataArray.getJSONObject(0);
|
||||||
|
|
||||||
|
if("1".equals(String.valueOf(dataObj.get("code")))){
|
||||||
|
gwLog.setStatus(2);
|
||||||
|
businessDocumentOrderDTO.setReviseApplyStatus(1);
|
||||||
|
updateReservationOrder(businessDocumentOrderDTO);
|
||||||
|
|
||||||
|
successCount++;
|
||||||
|
}else {
|
||||||
|
gwLog.setStatus(3);
|
||||||
|
gwLog.setErrorMsg(responseString);
|
||||||
|
|
||||||
|
failCount++;
|
||||||
|
failMsg.append("原始单证Id:").append(businessDocumentOrderDTO.getId()).append("失败:");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
gwLog.setStatus(3);
|
||||||
|
gwLog.setErrorMsg(responseString);
|
||||||
|
|
||||||
|
if (businessDocumentOrderDTO.getId() != null) {
|
||||||
|
businessDocumentOrderDTO.setReviseApplyStatus(2);
|
||||||
|
updateReservationOrder(businessDocumentOrderDTO);
|
||||||
|
}
|
||||||
|
failCount++;
|
||||||
|
failMsg.append("原始单证id:").append(businessDocumentOrderDTO.getId()).append("失败:");
|
||||||
|
}
|
||||||
|
gwLogMapper.updateById(gwLog);
|
||||||
|
response.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
gwLog.setStatus(3);
|
||||||
|
gwLog.setErrorMsg(e.getMessage());
|
||||||
|
gwLog.setResponseBody("请求异常:" + e.getMessage());
|
||||||
|
gwLogMapper.updateById(gwLog);
|
||||||
|
if (businessDocumentOrderDTO.getId() != null) {
|
||||||
|
businessDocumentOrderDTO.setReviseApplyStatus(2);
|
||||||
|
updateReservationOrder(businessDocumentOrderDTO);
|
||||||
|
}
|
||||||
|
failCount++;
|
||||||
|
failMsg.append("单证id:").append(businessDocumentOrderDTO.getId()).append("异常:").append(e.getMessage());
|
||||||
|
log.error("GW推送异常:单证id={}, error={}", businessDocumentOrderDTO.getId(), e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
String resultMsg = "推送完成:成功" + successCount + "条,失败" + failCount + "条";
|
||||||
|
if (failCount > 0) {
|
||||||
|
resultMsg += "[" + failMsg.toString() + "]";
|
||||||
|
}
|
||||||
|
return AjaxResult.success(resultMsg);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateReservationOrder(BusinessDocumentOrderDTO businessDocumentOrderDTO) {
|
||||||
|
try {
|
||||||
|
BusinessDocumentOrder businessDocumentOrder = new BusinessDocumentOrder();
|
||||||
|
BeanUtils.copyProperties(businessDocumentOrderDTO,businessDocumentOrder);
|
||||||
|
|
||||||
|
|
||||||
|
businessDocumentOrderMapper.updateById(businessDocumentOrder);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("删改单申请更新状态失败失败: id={}, error={}", businessDocumentOrderDTO.getId(), e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+5
@@ -5,7 +5,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
import com.mhd.oms.domain.businessDocumentCargoMulti.entity.BusinessDocumentCargoMulti;
|
import com.mhd.oms.domain.businessDocumentCargoMulti.entity.BusinessDocumentCargoMulti;
|
||||||
import com.mhd.oms.domain.businessDocumentCargoMulti.repository.po.BusinessDocumentCargoMultiPO;
|
import com.mhd.oms.domain.businessDocumentCargoMulti.repository.po.BusinessDocumentCargoMultiPO;
|
||||||
import com.mhd.oms.domain.businessDocumentCargoMulti.repository.todo.BusinessDocumentCargoMultiDO;
|
import com.mhd.oms.domain.businessDocumentCargoMulti.repository.todo.BusinessDocumentCargoMultiDO;
|
||||||
|
import com.mhd.oms.domain.businessDocumentOrder.repository.po.BusinessDocumentOrderPO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 【请填写功能名称】Mapper接口
|
* 【请填写功能名称】Mapper接口
|
||||||
*
|
*
|
||||||
@@ -19,4 +22,6 @@ public interface BusinessDocumentCargoMultiMapper extends BaseMapper<BusinessDoc
|
|||||||
*/
|
*/
|
||||||
public List<BusinessDocumentCargoMultiPO> queryList(BusinessDocumentCargoMultiDO businessDocumentCargoMultiDO);
|
public List<BusinessDocumentCargoMultiPO> queryList(BusinessDocumentCargoMultiDO businessDocumentCargoMultiDO);
|
||||||
|
|
||||||
|
|
||||||
|
List<BusinessDocumentCargoMultiPO> selectBatchByOrderId(@Param("orderId") String orderId);
|
||||||
}
|
}
|
||||||
|
|||||||
+4
@@ -67,5 +67,9 @@ public class BusinessDocumentCargoMultiPO extends BaseVOEntity{
|
|||||||
|
|
||||||
@ApiModelProperty("物料id")
|
@ApiModelProperty("物料id")
|
||||||
private Long materialBaseInfoId;
|
private Long materialBaseInfoId;
|
||||||
|
@ApiModelProperty("订单id")
|
||||||
|
private String OrderId;
|
||||||
|
@ApiModelProperty("货物信息-件数")
|
||||||
|
private BigDecimal CargoNum;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-8
@@ -4,13 +4,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.mhd.oms.interfaces.dto.businessDocumentCargoMulti.BusinessDocumentCargoMultiDTO;
|
import com.mhd.oms.interfaces.dto.businessDocumentCargoMulti.BusinessDocumentCargoMultiDTO;
|
||||||
import com.mhd.oms.domain.businessDocumentCargoMulti.repository.todo.BusinessDocumentCargoMultiDO;
|
import com.mhd.oms.domain.businessDocumentCargoMulti.repository.todo.BusinessDocumentCargoMultiDO;
|
||||||
import com.mhd.oms.domain.businessDocumentCargoMulti.repository.po.BusinessDocumentCargoMultiPO;
|
import com.mhd.oms.domain.businessDocumentCargoMulti.repository.po.BusinessDocumentCargoMultiPO;
|
||||||
@@ -89,7 +83,11 @@ public class BusinessDocumentCargoMultiApi extends BaseController{
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("根据物料ID列表批量查询物料")
|
||||||
|
@GetMapping("/getBatchByOrderId")
|
||||||
|
public TableDataInfo getBatchByIds(@RequestParam("orderId") String orderId) {
|
||||||
|
return businessDocumentCargoMultiApplicationService.getByOrderId(orderId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+13
@@ -171,4 +171,17 @@ public class OriginalImportExportDocumentApi extends BaseController {
|
|||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("批量推送")
|
||||||
|
@PostMapping("/batchPushForReviseApply")
|
||||||
|
public AjaxResult batchPushForReviseApply(@RequestBody BusinessDocumentOrderDTO businessDocumentOrderDTO){
|
||||||
|
if(businessDocumentOrderDTO == null){
|
||||||
|
return AjaxResult.error("没有数据需要推送");
|
||||||
|
}
|
||||||
|
return businessDocumentOrderApplicationService.batchPushForReviseApply(businessDocumentOrderDTO);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+13
@@ -22,6 +22,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="goodsNameId" column="GOODS_NAME_ID" />
|
<result property="goodsNameId" column="GOODS_NAME_ID" />
|
||||||
<result property="goodsName" column="GOODS_NAME" />
|
<result property="goodsName" column="GOODS_NAME" />
|
||||||
<result property="cargoWeight" column="CARGO_WEIGHT" />
|
<result property="cargoWeight" column="CARGO_WEIGHT" />
|
||||||
|
<result property="orderId" column="ORDER_ID" />
|
||||||
|
<result property="cargoNum" column="CARGO_NUM" />
|
||||||
|
<result property="materialBaseInfoId" column="MATERIAL_BASE_INFO_ID" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
@@ -89,4 +92,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<include refid="selectBusinessDocumentCargoMultiPo"/>
|
<include refid="selectBusinessDocumentCargoMultiPo"/>
|
||||||
<include refid="selectBusinessDocumentCargoMultiPo1"/>
|
<include refid="selectBusinessDocumentCargoMultiPo1"/>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectBatchByOrderId" resultMap="BusinessDocumentCargoMultiResult">
|
||||||
|
select id,order_id,cargo_num,material_base_info_id
|
||||||
|
from business_document_cargo_multi
|
||||||
|
where order_id =#{orderId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user