Merge branch 'refs/heads/dev' into dev-ty1.2

This commit is contained in:
rcx
2026-09-04 10:48:46 +08:00
19 changed files with 181 additions and 29 deletions
@@ -18,7 +18,7 @@ import java.util.Set;
/**
* bms财务结算系统feign调用接口
*/
@FeignClient(contextId = "BmsService", value = ServiceNameConstants.BMS_SERVICE, url = "http://10.33.0.129:8012",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class)
@FeignClient(contextId = "BmsService", value = ServiceNameConstants.BMS_SERVICE, url = "http://10.102.192.32:8019",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class)
public interface BmsServiceFeign {
@@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
import java.util.concurrent.CompletableFuture;
@FeignClient(contextId = "OmsService", value = ServiceNameConstants.OMS_SERVICE,url = "http://10.33.0.99:8017",fallbackFactory = RemoteOmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class)
@FeignClient(contextId = "OmsService", value = ServiceNameConstants.OMS_SERVICE,url = "http://10.102.192.33:8017",fallbackFactory = RemoteOmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class)
public interface OmsServiceFeign {
@@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
@FeignClient(contextId = "commonWlhyServiceFeign",value = ServiceNameConstants.WLHY_SERVICE,url = "http://10.33.0.129:8014",configuration = FeignAutoConfiguration.class)
@FeignClient(contextId = "commonWlhyServiceFeign",value = ServiceNameConstants.WLHY_SERVICE,url = "http://10.102.192.31:8014",configuration = FeignAutoConfiguration.class)
public interface WlhyServiceFeign {
/**
@@ -21,7 +21,7 @@ import java.util.Map;
* @description: TODO
* @date 2024/5/10 8:58
**/
@FeignClient(contextId = "remoteWmsServiceFeign",value = ServiceNameConstants.WMS_SERVICE, url = "http://10.33.0.109:8016",fallbackFactory = RemoteWmsFallbackFactory.class, configuration = FeignAutoConfiguration.class)
@FeignClient(contextId = "remoteWmsServiceFeign",value = ServiceNameConstants.WMS_SERVICE, url = "http://10.102.192.32:8016",fallbackFactory = RemoteWmsFallbackFactory.class, configuration = FeignAutoConfiguration.class)
public interface WmsServiceFeign {
/**
@@ -9,7 +9,7 @@ import com.mhd.system.api.feign.FeignAutoConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
@FeignClient(contextId = "YmsService", value = ServiceNameConstants.YMS_SERVICE,url = "http://10.33.0.99:8018",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class)
@FeignClient(contextId = "YmsService", value = ServiceNameConstants.YMS_SERVICE,url = "http://10.102.192.33:8018",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class)
public interface YmsServiceFeign {
/**
@@ -6,6 +6,7 @@ import com.mhd.bi.domain.biPlatformRealData.repository.po.RealVehicleStatusPO;
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealTaskLoadPO;
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealBusinessTypeStatPO;
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformFloorStatPO;
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformInfoPO;
import java.util.List;
@@ -39,4 +40,7 @@ public interface BiPlatformRealDataMapper {
/** 月台监控-按楼层统计月台车辆(楼层、月台数量、今日预约车辆、当前作业车辆) */
List<RealPlatformFloorStatPO> queryPlatformFloorStats();
/** 月台管理列表(YMS qms_window_info,含机构/鹤位/状态/楼层/UUID 等完整信息) */
List<RealPlatformInfoPO> queryPlatformInfoList();
}
@@ -0,0 +1,59 @@
package com.mhd.bi.domain.biPlatformRealData.repository.po;
import lombok.Data;
import java.io.Serializable;
/**
* 月台管理列表(真实数据,来自 TEST_NGWL_YMS.QMS_WINDOW_INFO
* 对应 YMS qms_window_info 月台/鹤位窗口表
*/
@Data
public class RealPlatformInfoPO implements Serializable {
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 机构代码(org_no */
private String orgNo;
/** 机构名称(dept_name */
private String deptName;
/** 鹤位号/月台号(window_number */
private String windowNumber;
/** 鹤位名称/月台名称(window_name */
private String windowName;
/** 优先级别(priority_set */
private String prioritySet;
/** 鹤位状态/月台状态(running_status */
private String runningStatus;
/** uuid */
private String uuid;
/** 鹤位屏名字集合/绑定月台屏(berr_names */
private String berrNames;
/** 最新业务状态(new_flow_status */
private String newFlowStatus;
/** 月台图片(guide_images */
private String guideImages;
/** 月台楼层(platform_floor */
private String platformFloor;
/** 作业状态 0-空闲 1-占用(job_status */
private Integer jobStatus;
/** 创建人(create_by */
private String createBy;
/** 创建时间(create_time */
private String createTime;
}
@@ -8,6 +8,7 @@ import com.mhd.bi.domain.biPlatformRealData.repository.po.RealVehicleStatusPO;
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealTaskLoadPO;
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealBusinessTypeStatPO;
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformFloorStatPO;
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformInfoPO;
import com.mhd.bi.domain.biPlatformSurveillance.repository.mapper.BiPlatformSurveillanceReportMapper;
import com.mhd.bi.domain.biSnapshotSync.repository.mapper.BiSnapshotWriteMapper;
import com.mhd.bi.domain.biSnapshotSync.support.BiSnapshotWeeklyRandomDataBuilder;
@@ -230,6 +231,18 @@ public class BiPlatformRealDataService {
}
}
/**
* 月台管理列表:实时查 YMS qms_window_info,返回月台/鹤位窗口完整信息,不落库。
*/
public List<RealPlatformInfoPO> queryPlatformInfoList() {
try {
return biPlatformRealDataMapper.queryPlatformInfoList();
} catch (Exception e) {
log.error("【YMS】查询月台管理列表失败: {}", e.getMessage(), e);
return java.util.Collections.emptyList();
}
}
/**
* 实时组装月台监测数据:原则「有真实数据源用真实,无真实数据源用写死模拟」。
* 有真实数据源的字段(vehicles / platformOverview / vehicleStatus / taskLoad / taskTotal
@@ -6,6 +6,7 @@ import com.mhd.bi.domain.biPlatformSurveillance.service.BiPlatformSurveillanceRe
import com.mhd.bi.domain.biPlatformRealData.service.BiPlatformRealDataService;
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealBusinessTypeStatPO;
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformFloorStatPO;
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformInfoPO;
import com.mhd.bi.domain.biOverallOperation.service.BiOverallOperationReportService;
import com.mhd.bi.domain.biHkMacaoServiceZone.service.BiHkMacaoServiceZoneReportService;
import com.mhd.bi.domain.biTransportOperationZone.service.BiTransportOperationZoneReportService;
@@ -128,6 +129,16 @@ public class BiReportApi extends BaseController {
List<RealPlatformFloorStatPO> data = biPlatformRealDataService.queryPlatformFloorStats();
return BiApiResult.ok(data);
}
/**
* 月台管理列表(实时查 YMS qms_window_info,不落库)
*/
@ApiOperation(value = "月台管理列表", notes = "实时查询 YMS 库 qms_window_info,返回月台/鹤位窗口列表(机构、月台号、月台名称、楼层、绑定屏、UUID、状态等),不落库")
@GetMapping("/platformInfoList")
public BiApiResult<List<RealPlatformInfoPO>> platformInfoList() {
List<RealPlatformInfoPO> data = biPlatformRealDataService.queryPlatformInfoList();
return BiApiResult.ok(data);
}
//园区物流大屏接口----------------------------------------------------------------------
/**
* 总体运营态势
@@ -113,4 +113,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
GROUP BY EXTRACT(HOUR FROM ENTRY_TIME)
ORDER BY EXTRACT(HOUR FROM ENTRY_TIME)
</select>
<!-- 月台管理列表:查询 YMS qms_window_info 月台/鹤位窗口
机构名称 deptName <- sys_dept.DEPT_NAMEd.dept_id = a.ORG_NO 关联)
鹤位屏名称 berrNames <- qms_window_berr(WINDOW_ID/BERR_ID) join qms_berr_config(ID/BERR_NAME)WM_CONCAT 拼接
其余列来自 qms_window_info 本身 -->
<select id="queryPlatformInfoList" resultType="com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformInfoPO">
SELECT
a.ID AS id,
a.ORG_NO AS orgNo,
d.DEPT_NAME AS deptName,
a.WINDOW_NUMBER AS windowNumber,
a.WINDOW_NAME AS windowName,
a.PRIORITY_SET AS prioritySet,
a.RUNNING_STATUS AS runningStatus,
a.CREATE_BY AS createBy,
TO_CHAR(a.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') AS createTime,
a.UUID AS uuid,
a.GUIDE_IMAGES AS guideImages,
a.PLATFORM_FLOOR AS platformFloor,
a.JOB_STATUS AS jobStatus,
(
SELECT WM_CONCAT(qbc.BERR_NAME)
FROM NGWL_TEST_YMS.QMS_WINDOW_BERR qwb
LEFT JOIN NGWL_TEST_YMS.QMS_BERR_CONFIG qbc ON qbc.ID = qwb.BERR_ID
WHERE qwb.WINDOW_ID = a.ID
) AS berrNames
FROM NGWL_TEST_YMS.QMS_WINDOW_INFO a
LEFT JOIN NGWL_TEST_YMS.SYS_DEPT d ON d.DEPT_ID = a.ORG_NO
ORDER BY a.PLATFORM_FLOOR, a.WINDOW_NUMBER
</select>
</mapper>
@@ -26,7 +26,7 @@ import java.io.InputStream;
import java.util.List;
import java.util.Map;
@FeignClient(value = "mhd-third-party-service",url = "http://10.33.0.129:8012",configuration = FeignAutoConfiguration.class)
@FeignClient(value = "mhd-third-party-service",url = "http://10.102.192.31:8012", configuration = FeignAutoConfiguration.class)
public interface ThirdPartyServiceFeign {
//查询当前组织所有三方接口信息
@@ -461,7 +461,8 @@ public class MessageManageApplicationService
//获取当前登录人
LoginUser loginUser = SecurityUtils.getLoginUser();
if(null == loginUser){
throw new ServiceException("获取登录人失败");
//未登录(游客):返回空消息中心结构,保证小程序界面正常展示而不报错
return buildEmptyAppNoticeList();
}
noticeMessageLoggingDo.setUserId(loginUser.getUserid());
//获取每种类型的最新一条
@@ -522,6 +523,27 @@ public class MessageManageApplicationService
return result;
}
/**
* 未登录(游客)时返回空的消息中心结构,避免前端页面因无登录上下文而报错
* @return NoticeMessageLoggingAppListPo
*/
private NoticeMessageLoggingAppListPo buildEmptyAppNoticeList() {
NoticeMessageLoggingAppListPo result = new NoticeMessageLoggingAppListPo();
NoticeMessageLoggingAppListPo.CommonNotice serviceNotice = new NoticeMessageLoggingAppListPo.CommonNotice();
serviceNotice.setUnreadNum("0");
NoticeMessageLoggingAppListPo.CommonNotice activityNotice = new NoticeMessageLoggingAppListPo.CommonNotice();
activityNotice.setUnreadNum("0");
NoticeMessageLoggingAppListPo.CommonNotice logisticsNotice = new NoticeMessageLoggingAppListPo.CommonNotice();
logisticsNotice.setUnreadNum("0");
NoticeMessageLoggingAppListPo.CommonNotice systemNotice = new NoticeMessageLoggingAppListPo.CommonNotice();
systemNotice.setUnreadNum("0");
result.setServiceNotice(serviceNotice);
result.setActivityNotice(activityNotice);
result.setLogisticsNotice(logisticsNotice);
result.setSystemNotice(systemNotice);
return result;
}
/**
* APP根据类型获取消息通知
* @param noticeMessageLoggingDo
@@ -13,17 +13,17 @@ spring:
cloud:
nacos:
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.102.192.30:6848
server-addr: 10.102.192.31:6848
username: nacos
password: manhuoda@2023
#线上正式环境
# server-addr: 10.102.192.105:6848
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.102.192.30:6848
server-addr: 10.102.192.31:6848
username: nacos
password: manhuoda@2023
#线上正式环境
@@ -22,7 +22,7 @@ import java.util.Map;
/**
* 三方服务 Feign
*/
@FeignClient(contextId = "thirdPartyServiceFeign",url = "http://10.33.0.129:8012", value = ServiceNameConstants.THIRDPARTY_CENTER, configuration = FeignAutoConfiguration.class)
@FeignClient(contextId = "thirdPartyServiceFeign",url = "http://10.102.192.31:8012", value = ServiceNameConstants.THIRDPARTY_CENTER, configuration = FeignAutoConfiguration.class)
public interface ThirdPartyServiceFeign {
//查询当前组织所有三方接口信息
+4 -4
View File
@@ -18,15 +18,15 @@ spring:
discovery:
# server-addr: 127.0.0.1:8848
# 线上测试环境配置 容器名+端口号
server-addr: 10.33.0.129:6010
# server-addr: 10.102.192.30:6848
# server-addr: 10.33.0.129:6010
server-addr: 10.102.192.31:6848
username: nacos
password: manhuoda@2023
config:
# server-addr: 127.0.0.1:8848
# 线上测试环境配置 容器名+端口号
server-addr: 10.33.0.129:6010
# server-addr: 10.102.192.30:6848
# server-addr: 10.33.0.129:6010
server-addr: 10.102.192.31:6848
username: nacos
password: manhuoda@2023
#线上正式环境
@@ -87,13 +87,23 @@ public class AppMenuApplicationService {
if (StringUtils.isBlank(appMenuDO.getAppPackage()) || StringUtils.isBlank(appMenuDO.getAppLocationCode())){
throw new ServiceException("app包名或app位置不能为空");
}
// 判断是否为已登录用户小程序未登录访问时getLoginUser/getUserPo 可能为空
LoginUser loginUser = SecurityUtils.getLoginUser();
boolean isLogin = loginUser != null && loginUser.getUserPo() != null;
if (isLogin) {
if (appMenuDO.getUserId() == null){
appMenuDO.setUserId(SecurityUtils.getUserId());
// token 中解析出的真实用户ID避免依赖网关 header未注入时 SecurityUtils.getUserId() 会返回 0
appMenuDO.setUserId(loginUser.getUserid());
}
if (appMenuDO.getTopOrganizationId() == null){
appMenuDO.setTopOrganizationId(SecurityUtils.getLoginUser().getUserPo().getTopOrganizationId());
appMenuDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
}
}
// 未登录(游客)userId/topOrganizationId 保持为空走公共菜单查询返回该 app 全部菜单
List<MenuPo> menuPos = appMenuDomainService.queryMenuListByApp(appMenuDO);
if (!isLogin) {
return menuPos != null ? menuPos : new ArrayList<>();
}
// 获取用户角色 查角色APP菜单权限 取交集去重
List<UserRoleMenuPO> userRoles = userFeignService.selectUserRoles(appMenuDO.getUserId());
menuPos = filterMenuByUserRole(menuPos, userRoles);
+4 -4
View File
@@ -18,18 +18,18 @@ spring:
cloud:
nacos:
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.102.192.31:6848
server-addr: 10.102.192.30:6848
username: nacos
password: manhuoda@2023
#线上正式环境
# server-addr: 10.33.0.129:6010
#
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.102.192.31:6848
server-addr: 10.102.192.30:6848
username: nacos
password: manhuoda@2023
#线上正式环境
@@ -99,7 +99,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and me.menu_show = 1
and co.app_package = #{appPackage}
and me.app_location_code = #{appLocationCode}
<!-- 未登录(游客)时不传组织,返回该 app 全部公共菜单 -->
<if test="topOrganizationId != null">
and me.top_organization_id = #{topOrganizationId}
</if>
order by me.menu_sort,me.create_time asc
</select>
</mapper>
+4 -4
View File
@@ -14,18 +14,18 @@ spring:
nacos:
discovery:
# 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.30:6848
server-addr: 10.102.192.31:6848
username: nacos
password: manhuoda@2023
#线上正式环境
# server-addr: 10.102.192.105:6848
config:
# server-addr: 127.0.0.1:8848
server-addr: 10.33.0.129:6010
# server-addr: 10.33.0.129:
# 线上测试环境配置 容器名+端口号
# server-addr: 10.102.192.30:6848
server-addr: 10.102.192.31:6848
username: nacos
password: manhuoda@2023
#线上正式环境