From cb5d933e0a3862c495e4d8d162c036f4d7f35324 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=A5=8E=E5=85=B4?= <2220574228@qq.com> Date: Mon, 24 Aug 2026 16:53:20 +0800 Subject: [PATCH 01/20] =?UTF-8?q?=E6=B8=97=E9=80=8F=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E4=BF=AE=E6=94=B9;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/SysConfigController.java | 28 ++++---- .../system/controller/SysUserController.java | 5 +- .../service/UserApplicationService.java | 68 +++++++++++++------ .../userAggregate/repository/todo/UserDO.java | 2 + .../user/interfaces/dto/addDTO/UserDTO.java | 2 + 5 files changed, 71 insertions(+), 34 deletions(-) diff --git a/mhd-modules/mhd-system/src/main/java/com/mhd/system/controller/SysConfigController.java b/mhd-modules/mhd-system/src/main/java/com/mhd/system/controller/SysConfigController.java index 556b1d6ed..57359012e 100644 --- a/mhd-modules/mhd-system/src/main/java/com/mhd/system/controller/SysConfigController.java +++ b/mhd-modules/mhd-system/src/main/java/com/mhd/system/controller/SysConfigController.java @@ -40,14 +40,14 @@ public class SysConfigController extends BaseController /** * 获取参数配置列表 */ - @RequiresPermissions("system:config:list") - @GetMapping("/list") - public TableDataInfo list(SysConfig config) - { - startPage(); - List list = configService.selectConfigList(config); - return getDataTable(list); - } +// @RequiresPermissions("system:config:list") +// @GetMapping("/list") +// public TableDataInfo list(SysConfig config) +// { +// startPage(); +// List list = configService.selectConfigList(config); +// return getDataTable(list); +// } @Log(title = "参数管理", businessType = BusinessType.EXPORT) @RequiresPermissions("system:config:export") @@ -71,11 +71,11 @@ public class SysConfigController extends BaseController /** * 根据参数键名查询参数值 */ - @GetMapping(value = "/configKey/{configKey}") - public AjaxResult getConfigKey(@PathVariable String configKey) - { - return AjaxResult.success(configService.selectConfigByKey(configKey)); - } +// @GetMapping(value = "/configKey/{configKey}") +// public AjaxResult getConfigKey(@PathVariable String configKey) +// { +// return AjaxResult.success(configService.selectConfigByKey(configKey)); +// } /** * 新增参数配置 @@ -132,4 +132,4 @@ public class SysConfigController extends BaseController configService.resetConfigCache(); return AjaxResult.success(); } -} +} \ No newline at end of file diff --git a/mhd-modules/mhd-system/src/main/java/com/mhd/system/controller/SysUserController.java b/mhd-modules/mhd-system/src/main/java/com/mhd/system/controller/SysUserController.java index e42985aa6..55560f34a 100644 --- a/mhd-modules/mhd-system/src/main/java/com/mhd/system/controller/SysUserController.java +++ b/mhd-modules/mhd-system/src/main/java/com/mhd/system/controller/SysUserController.java @@ -85,6 +85,9 @@ public class SysUserController extends BaseController } } List list = userService.selectUserList(user); + for (SysUser sysUser : list) { + sysUser.setPassword("******"); + } return getDataTable(list); } @@ -323,4 +326,4 @@ public class SysUserController extends BaseController userService.insertUserAuth(userId, roleIds); return success(); } -} +} \ No newline at end of file diff --git a/mhd-user-center/src/main/java/com/mhd/user/application/service/UserApplicationService.java b/mhd-user-center/src/main/java/com/mhd/user/application/service/UserApplicationService.java index d7576a132..e4372185b 100644 --- a/mhd-user-center/src/main/java/com/mhd/user/application/service/UserApplicationService.java +++ b/mhd-user-center/src/main/java/com/mhd/user/application/service/UserApplicationService.java @@ -3428,6 +3428,24 @@ public class UserApplicationService { if (!ObjectUtil.equal(String.valueOf(object), verificationCode) && !ObjectUtil.equal(verificationCode, SmsConstants.universalCode)) { throw new ServiceException("验证码错误"); }*/ + String oldUserPassword = userDO.getOldUserPassword(); + if (oldUserPassword==null||oldUserPassword=="") { + throw new ServiceException("旧密码不能为空"); + } + String userPassword1 = userPo.getUserPassword(); + String oldDecrypt = AESUtil.decrypt(oldUserPassword); + String nowDecrypt = AESUtil.decrypt(userPassword1); + if (!oldDecrypt.equals(nowDecrypt)) { + throw new ServiceException("旧密码错误"); + } + String newUserPassword = userDO.getUserPassword(); + // 校验新密码复杂度:必须同时包含大写字母、小写字母、数字和特殊符号 + if (StringUtils.isNotEmpty(newUserPassword)) { + String decryptedNewPassword = AESUtil.decrypt(newUserPassword); + if (!decryptedNewPassword.matches("^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[^a-zA-Z0-9]).+$")) { + throw new ServiceException("新密码必须同时包含大写字母、小写字母、数字和特殊符号"); + } + } //用户密码传值 if (StringUtils.isNotEmpty(userDO.getUserPassword())) { String userPassword = AESUtil.decrypt(userDO.getUserPassword()); @@ -3444,25 +3462,25 @@ public class UserApplicationService { userDomainService.updateUser(userDO); } }else { - String userPassword1 = userDO.getUserPassword(); - for (Long id : userDO.getUserIds()) { - UserPo userPo1 = userDomainService.selectByUserId(id); - //用户密码传值 - if (StringUtils.isNotEmpty(userDO.getUserPassword())) { - String userPassword = AESUtil.decrypt(userPassword1); - // 生成随机8位数盐 - String salt = OConvertUtils.randomGen(8); - userDO.setUserSalt(salt); - //加密算法,PBEWithMD5AndDES, - String passwordEncode = PasswordUtil.encrypt(userPo1.getUserAccount(), userPassword, salt); - userDO.setUserPassword(passwordEncode); - } - - if (ObjectUtil.isNotNull(userPo1)) { - userDO.setUserId(userPo1.getUserId()); - userDomainService.updateUser(userDO); - } - } +// String userPassword1 = userDO.getUserPassword(); +// for (Long id : userDO.getUserIds()) { +// UserPo userPo1 = userDomainService.selectByUserId(id); +// //用户密码传值 +// if (StringUtils.isNotEmpty(userDO.getUserPassword())) { +// String userPassword = AESUtil.decrypt(userPassword1); +// // 生成随机8位数盐 +// String salt = OConvertUtils.randomGen(8); +// userDO.setUserSalt(salt); +// //加密算法,PBEWithMD5AndDES, +// String passwordEncode = PasswordUtil.encrypt(userPo1.getUserAccount(), userPassword, salt); +// userDO.setUserPassword(passwordEncode); +// } +// +// if (ObjectUtil.isNotNull(userPo1)) { +// userDO.setUserId(userPo1.getUserId()); +// userDomainService.updateUser(userDO); +// } +// } } return true; } @@ -3874,6 +3892,18 @@ public class UserApplicationService { //新支付密码 String payPassword = userDTO.getUserPayPassword(); + String userPayPassword = userPo.getUserPayPassword(); + String nowPayPassword = AESUtil.decrypt(userPayPassword); + String oldUserPassword = userDTO.getOldUserPayPassword(); + if(oldUserPassword == null || "".equals(oldUserPassword)) { + throw new ServiceException("旧密码不能为空"); + } + String oldPayPassword = AESUtil.decrypt(oldUserPassword); + if(!nowPayPassword.equals(oldPayPassword)) { + throw new ServiceException("旧密码不正确"); + } + + //验证码登录校验验证码 String key = CacheConstants.SMS_PAY_CHANGE + userPhone; Object object = redisService.getCacheObject(key) == null ? "" : redisService.getCacheObject(key); diff --git a/mhd-user-center/src/main/java/com/mhd/user/domain/userAggregate/repository/todo/UserDO.java b/mhd-user-center/src/main/java/com/mhd/user/domain/userAggregate/repository/todo/UserDO.java index c18ad9ce9..ca1e06758 100644 --- a/mhd-user-center/src/main/java/com/mhd/user/domain/userAggregate/repository/todo/UserDO.java +++ b/mhd-user-center/src/main/java/com/mhd/user/domain/userAggregate/repository/todo/UserDO.java @@ -49,6 +49,8 @@ public class UserDO extends BaseVOEntity { private String userMemberCode; @ApiModelProperty(name = "登录密码") private String userPassword; + @ApiModelProperty(name = "老登录密码") + private String oldUserPassword; @ApiModelProperty(name = "确认登录密码") private String copyUserPassword; @ApiModelProperty(name = "盐") diff --git a/mhd-user-center/src/main/java/com/mhd/user/interfaces/dto/addDTO/UserDTO.java b/mhd-user-center/src/main/java/com/mhd/user/interfaces/dto/addDTO/UserDTO.java index fcdaad5f9..d329b0a27 100644 --- a/mhd-user-center/src/main/java/com/mhd/user/interfaces/dto/addDTO/UserDTO.java +++ b/mhd-user-center/src/main/java/com/mhd/user/interfaces/dto/addDTO/UserDTO.java @@ -49,6 +49,8 @@ public class UserDTO extends BaseVOEntity { private String userSalt; @ApiModelProperty(name = "支付密码") private String userPayPassword; + @ApiModelProperty(name = "旧支付密码") + private String oldUserPayPassword; @ApiModelProperty(name = "身份证号") private String userIdcardNumber; @ApiModelProperty(name = "身份证号加密") From dbd61c0519115e988d941f96eb89fe9900b4ff89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=A5=8E=E5=85=B4?= <2220574228@qq.com> Date: Mon, 24 Aug 2026 16:58:26 +0800 Subject: [PATCH 02/20] =?UTF-8?q?=E5=8F=9130?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mhd-user-center/src/main/resources/bootstrap.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mhd-user-center/src/main/resources/bootstrap.yml b/mhd-user-center/src/main/resources/bootstrap.yml index dd13bfba5..6bf4ff00a 100644 --- a/mhd-user-center/src/main/resources/bootstrap.yml +++ b/mhd-user-center/src/main/resources/bootstrap.yml @@ -21,14 +21,14 @@ spring: # 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 config: # 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 group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置 From f5f792d3f84b5c231633e7589ad8cf3a3902b903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=A5=8E=E5=85=B4?= <2220574228@qq.com> Date: Mon, 24 Aug 2026 17:03:55 +0800 Subject: [PATCH 03/20] =?UTF-8?q?=E5=8F=9131?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/mhd/system/api/BmsServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/OmsServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/WlhyServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/WmsServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/YmsServiceFeign.java | 2 +- .../com/mhd/common/core/feign/ThirdPartyServiceFeign.java | 2 +- mhd-modules/mhd-system/src/main/resources/bootstrap.yml | 4 ++-- mhd-user-center/src/main/resources/bootstrap.yml | 4 ++-- .../mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java index e18484e8d..8cc8bfd57 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java @@ -18,7 +18,7 @@ import java.util.Set; /** * bms财务结算系统feign调用接口 */ -@FeignClient(contextId = "BmsService", value = ServiceNameConstants.BMS_SERVICE, url = "http://10.102.192.3:8019",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 { diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/OmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/OmsServiceFeign.java index e9418197a..4ef3bed80 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/OmsServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/OmsServiceFeign.java @@ -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.102.192.4: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 { diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java index e4a817238..d976fcc98 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java @@ -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.102.192.30:8014",configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "commonWlhyServiceFeign",value = ServiceNameConstants.WLHY_SERVICE,url = "http://10.102.192.31:8014",configuration = FeignAutoConfiguration.class) public interface WlhyServiceFeign { /** diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java index 26a92624c..1fe69a003 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java @@ -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.102.192.3: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 { /** diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java index 12571141a..750ed853e 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java @@ -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.102.192.4: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 { /** diff --git a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java index 6238639f6..509644885 100644 --- a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java @@ -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.102.192.30:8012", configuration = FeignAutoConfiguration.class) +@FeignClient(value = "mhd-third-party-service",url = "http://10.102.192.31:8012", configuration = FeignAutoConfiguration.class) public interface ThirdPartyServiceFeign { //查询当前组织所有三方接口信息 diff --git a/mhd-modules/mhd-system/src/main/resources/bootstrap.yml b/mhd-modules/mhd-system/src/main/resources/bootstrap.yml index b1b1ca982..99aaf5e4c 100644 --- a/mhd-modules/mhd-system/src/main/resources/bootstrap.yml +++ b/mhd-modules/mhd-system/src/main/resources/bootstrap.yml @@ -15,7 +15,7 @@ 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.102.192.31:6848 username: nacos password: manhuoda@2023 #线上正式环境 @@ -23,7 +23,7 @@ spring: 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.102.192.31:6848 username: nacos password: manhuoda@2023 #线上正式环境 diff --git a/mhd-user-center/src/main/resources/bootstrap.yml b/mhd-user-center/src/main/resources/bootstrap.yml index 6bf4ff00a..dd13bfba5 100644 --- a/mhd-user-center/src/main/resources/bootstrap.yml +++ b/mhd-user-center/src/main/resources/bootstrap.yml @@ -21,14 +21,14 @@ spring: # 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 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.102.192.31:6848 username: nacos password: manhuoda@2023 group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置 diff --git a/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java index ca93d3312..8c86ae1ad 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java +++ b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java @@ -22,7 +22,7 @@ import java.util.Map; /** * 三方服务 Feign */ -@FeignClient(contextId = "thirdPartyServiceFeign",url = "http://10.102.192.30: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 { //查询当前组织所有三方接口信息 From 19161527759346f03b8df76e43997a878471d59b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=A5=8E=E5=85=B4?= <2220574228@qq.com> Date: Tue, 25 Aug 2026 10:41:58 +0800 Subject: [PATCH 04/20] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=A7=94=E6=89=98?= =?UTF-8?q?=E6=96=B9=E5=8E=BB=E9=99=A4=E7=BB=84=E7=BB=87=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/billManage/repository/mapper/BillManageMapper.java | 2 +- .../billManage/repository/persistence/BillManageImpl.java | 4 ++-- mhd_bms/src/main/resources/mapper/BillManageMapper.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/billManage/repository/mapper/BillManageMapper.java b/mhd_bms/src/main/java/com/mhd/bms/domain/billManage/repository/mapper/BillManageMapper.java index 5a4edf3f3..04608dd9a 100644 --- a/mhd_bms/src/main/java/com/mhd/bms/domain/billManage/repository/mapper/BillManageMapper.java +++ b/mhd_bms/src/main/java/com/mhd/bms/domain/billManage/repository/mapper/BillManageMapper.java @@ -45,5 +45,5 @@ public interface BillManageMapper extends BaseMapper String getOrgCodeNc(@Param("organizationId") Long organizationId); - Long getShipperId(@Param("userId") Long userId, @Param("organizationId") Long organizationId); + Long getShipperId(@Param("userId") Long userId); } \ No newline at end of file diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/billManage/repository/persistence/BillManageImpl.java b/mhd_bms/src/main/java/com/mhd/bms/domain/billManage/repository/persistence/BillManageImpl.java index 4649d3b7c..e9148ca7c 100644 --- a/mhd_bms/src/main/java/com/mhd/bms/domain/billManage/repository/persistence/BillManageImpl.java +++ b/mhd_bms/src/main/java/com/mhd/bms/domain/billManage/repository/persistence/BillManageImpl.java @@ -269,7 +269,7 @@ public class BillManageImpl extends ServiceImpl im throw new ServiceException("结算对象未找到!"); } Long settlementEntityId = settlementCustomers.getSettlementEntityId(); - Long shipperId = billManageMapper.getShipperId(settlementEntityId, organizationId); + Long shipperId = billManageMapper.getShipperId(settlementEntityId); if (shipperId==null||shipperId==0){ throw new ServiceException("结算对象未找到!"); } @@ -940,7 +940,7 @@ public class BillManageImpl extends ServiceImpl im throw new ServiceException("结算对象未找到!"); } Long settlementEntityId = settlementCustomers.getSettlementEntityId(); - Long shipperId = billManageMapper.getShipperId(settlementEntityId, organizationId); + Long shipperId = billManageMapper.getShipperId(settlementEntityId); if (shipperId==null||shipperId==0){ throw new ServiceException("结算对象未找到!"); } diff --git a/mhd_bms/src/main/resources/mapper/BillManageMapper.xml b/mhd_bms/src/main/resources/mapper/BillManageMapper.xml index c3dae03e5..3666da832 100644 --- a/mhd_bms/src/main/resources/mapper/BillManageMapper.xml +++ b/mhd_bms/src/main/resources/mapper/BillManageMapper.xml @@ -170,7 +170,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" \ No newline at end of file From 4168f921f67e13e7e78d882fb5e0342cb0e7dd93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=A5=8E=E5=85=B4?= <2220574228@qq.com> Date: Tue, 25 Aug 2026 10:52:28 +0800 Subject: [PATCH 05/20] =?UTF-8?q?=E6=9F=A5=E8=AF=A2nc=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=E4=BF=AE=E6=94=B9;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../server/billManage/BillManageApplicationService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mhd_bms/src/main/java/com/mhd/bms/application/server/billManage/BillManageApplicationService.java b/mhd_bms/src/main/java/com/mhd/bms/application/server/billManage/BillManageApplicationService.java index 2c79c842e..f44c3a311 100644 --- a/mhd_bms/src/main/java/com/mhd/bms/application/server/billManage/BillManageApplicationService.java +++ b/mhd_bms/src/main/java/com/mhd/bms/application/server/billManage/BillManageApplicationService.java @@ -766,7 +766,7 @@ public class BillManageApplicationService { } public List getNcLog(Long id, Long type) { - return ncLogMapper.selectList(new LambdaQueryWrapper().eq(NcLog::getOrderId, id).eq(NcLog::getType, type).orderByDesc(NcLog::getSendTime)); + return ncLogMapper.selectList(new LambdaQueryWrapper().eq(NcLog::getOrderId, id).eq(NcLog::getType, type).orderByDesc(NcLog::getNcLogId)); } /** From a62ed7c60fbd1f1c2f6d4deeb7af6be6627a9c7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E9=B8=BF=E5=B1=95?= <18031053041@163.com> Date: Tue, 25 Aug 2026 11:05:06 +0800 Subject: [PATCH 06/20] 31 --- mhd_bms/src/main/resources/bootstrap.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mhd_bms/src/main/resources/bootstrap.yml b/mhd_bms/src/main/resources/bootstrap.yml index d68deb6eb..1b1edd68f 100644 --- a/mhd_bms/src/main/resources/bootstrap.yml +++ b/mhd_bms/src/main/resources/bootstrap.yml @@ -19,14 +19,14 @@ spring: # 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 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.102.192.31:6848 username: nacos password: manhuoda@2023 group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置 From f2f3fb9c19942b7112297d4d3cb4138b5f29cfbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E9=B8=BF=E5=B1=95?= <18031053041@163.com> Date: Tue, 25 Aug 2026 11:09:23 +0800 Subject: [PATCH 07/20] 30 --- .../src/main/java/com/mhd/system/api/BmsServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/OmsServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/WlhyServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/WmsServiceFeign.java | 2 +- .../src/main/java/com/mhd/system/api/YmsServiceFeign.java | 2 +- .../com/mhd/common/core/feign/ThirdPartyServiceFeign.java | 2 +- mhd_bms/src/main/resources/bootstrap.yml | 4 ++-- .../mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java index 8cc8bfd57..e18484e8d 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java @@ -18,7 +18,7 @@ import java.util.Set; /** * bms财务结算系统feign调用接口 */ -@FeignClient(contextId = "BmsService", value = ServiceNameConstants.BMS_SERVICE, url = "http://10.102.192.32:8019",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "BmsService", value = ServiceNameConstants.BMS_SERVICE, url = "http://10.102.192.3:8019",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface BmsServiceFeign { diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/OmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/OmsServiceFeign.java index 4ef3bed80..e9418197a 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/OmsServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/OmsServiceFeign.java @@ -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.102.192.33:8017",fallbackFactory = RemoteOmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "OmsService", value = ServiceNameConstants.OMS_SERVICE,url = "http://10.102.192.4:8017",fallbackFactory = RemoteOmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface OmsServiceFeign { diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java index d976fcc98..e4a817238 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java @@ -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.102.192.31:8014",configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "commonWlhyServiceFeign",value = ServiceNameConstants.WLHY_SERVICE,url = "http://10.102.192.30:8014",configuration = FeignAutoConfiguration.class) public interface WlhyServiceFeign { /** diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java index 1fe69a003..26a92624c 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WmsServiceFeign.java @@ -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.102.192.32:8016",fallbackFactory = RemoteWmsFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "remoteWmsServiceFeign",value = ServiceNameConstants.WMS_SERVICE, url = "http://10.102.192.3:8016",fallbackFactory = RemoteWmsFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface WmsServiceFeign { /** diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java index 750ed853e..12571141a 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/YmsServiceFeign.java @@ -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.102.192.33:8018",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "YmsService", value = ServiceNameConstants.YMS_SERVICE,url = "http://10.102.192.4:8018",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class) public interface YmsServiceFeign { /** diff --git a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java index 509644885..6238639f6 100644 --- a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/feign/ThirdPartyServiceFeign.java @@ -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.102.192.31:8012", configuration = FeignAutoConfiguration.class) +@FeignClient(value = "mhd-third-party-service",url = "http://10.102.192.30:8012", configuration = FeignAutoConfiguration.class) public interface ThirdPartyServiceFeign { //查询当前组织所有三方接口信息 diff --git a/mhd_bms/src/main/resources/bootstrap.yml b/mhd_bms/src/main/resources/bootstrap.yml index 1b1edd68f..d68deb6eb 100644 --- a/mhd_bms/src/main/resources/bootstrap.yml +++ b/mhd_bms/src/main/resources/bootstrap.yml @@ -19,14 +19,14 @@ spring: # 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 config: # 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 group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置 diff --git a/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java index 8c86ae1ad..ca93d3312 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java +++ b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java @@ -22,7 +22,7 @@ import java.util.Map; /** * 三方服务 Feign */ -@FeignClient(contextId = "thirdPartyServiceFeign",url = "http://10.102.192.31:8012", value = ServiceNameConstants.THIRDPARTY_CENTER, configuration = FeignAutoConfiguration.class) +@FeignClient(contextId = "thirdPartyServiceFeign",url = "http://10.102.192.30:8012", value = ServiceNameConstants.THIRDPARTY_CENTER, configuration = FeignAutoConfiguration.class) public interface ThirdPartyServiceFeign { //查询当前组织所有三方接口信息 From 8dcb2334d5a3af28f8a19754c8a44b7cb8855cc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E9=B8=BF=E5=B1=95?= <18031053041@163.com> Date: Tue, 25 Aug 2026 20:11:52 +0800 Subject: [PATCH 08/20] =?UTF-8?q?BI=E6=9C=88=E5=8F=B0=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/BiPlatformRealDataService.java | 99 ++++++++++++++++++- .../mapper/BiSnapshotWriteMapper.java | 2 + .../service/BiReportSnapshotSyncService.java | 3 +- .../facadeApi/biReport/BiReportApi.java | 6 +- .../biSnapshotSync/BiSnapshotWriteMapper.xml | 9 ++ 5 files changed, 114 insertions(+), 5 deletions(-) diff --git a/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/service/BiPlatformRealDataService.java b/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/service/BiPlatformRealDataService.java index a3c52b08d..efa81e648 100644 --- a/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/service/BiPlatformRealDataService.java +++ b/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/service/BiPlatformRealDataService.java @@ -1,22 +1,28 @@ package com.mhd.bi.domain.biPlatformRealData.service; +import com.fasterxml.jackson.databind.ObjectMapper; import com.mhd.bi.domain.biPlatformRealData.repository.mapper.BiPlatformRealDataMapper; import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformVehiclePO; import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformOverviewPO; import com.mhd.bi.domain.biPlatformRealData.repository.po.RealVehicleStatusPO; import com.mhd.bi.domain.biPlatformRealData.repository.po.RealTaskLoadPO; +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; import com.mhd.bi.interfaces.facadeApi.biReport.vo.platform.PlatformSurveillanceVO; import com.mhd.bi.interfaces.facadeApi.biReport.vo.platform.PlatformVehicleItemVO; import com.mhd.bi.interfaces.facadeApi.biReport.vo.platform.TaskLoadItemVO; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.ArrayList; import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Random; /** @@ -30,6 +36,96 @@ public class BiPlatformRealDataService { @Resource private BiPlatformRealDataMapper biPlatformRealDataMapper; + @Resource + private BiSnapshotWriteMapper biSnapshotWriteMapper; + + @Resource + private BiPlatformSurveillanceReportMapper biPlatformSurveillanceReportMapper; + + @Resource + private ObjectMapper objectMapper; + + private static final String REMARK_REALTIME = "realtime platform-surveillance"; + + /** + * 实时组装月台监测数据;仅当真实业务数据(YMS 库查出的字段)发生变化时, + * 才覆盖更新 BI_PLATFORM_SURVEILLANCE_SNAPSHOT 快照表最新一条后返回。 + * 写死字段变化不触发更新;表中尚无记录时插入一条兜底。 + */ + public PlatformSurveillanceVO buildRealTimePlatformSurveillanceAndPersist() { + PlatformSurveillanceVO vo = buildRealTimePlatformSurveillance(); + try { + String fullJson = objectMapper.writeValueAsString(vo); + String fingerprint = realDataFingerprint(vo); + + String latestJson = biPlatformSurveillanceReportMapper.selectLatestPayloadJson(); + if (StringUtils.isNotBlank(latestJson)) { + PlatformSurveillanceVO latestVo = objectMapper.readValue(latestJson.trim(), PlatformSurveillanceVO.class); + if (Objects.equals(fingerprint, realDataFingerprint(latestVo))) { + log.info("BI 月台监测真实业务数据未变化,跳过落库"); + return vo; + } + } + + int rows = biSnapshotWriteMapper.updateLatestPlatformSurveillanceSnapshot(fullJson, REMARK_REALTIME); + if (rows < 1) { + // 表中无最新记录可更新,插入一条兜底 + biSnapshotWriteMapper.insertPlatformSurveillanceSnapshot(fullJson, REMARK_REALTIME); + } + log.info("BI 月台监测实时数据已落库(覆盖最新, 数据变化), affectedRows={}", rows); + } catch (Exception e) { + log.error("BI 月台监测实时数据落库失败", e); + } + return vo; + } + + /** + * 提取月台监测的「真实业务数据」指纹(仅含 YMS 库查出的字段),用于判断业务数据是否变化。 + * 写死/随机字段不纳入指纹,故其变化不会触发更新。 + */ + private String realDataFingerprint(PlatformSurveillanceVO vo) throws Exception { + Map fp = new LinkedHashMap<>(); + if (vo.getPlatformOverview() != null) { + fp.put("totalPlatforms", vo.getPlatformOverview().getTotalPlatforms()); + fp.put("operatingPlatforms", vo.getPlatformOverview().getOperatingPlatforms()); + fp.put("todayTasks", vo.getPlatformOverview().getTodayTasks()); + } + if (vo.getVehicleStatus() != null) { + fp.put("todayReservedVehicles", vo.getVehicleStatus().getTodayReservedVehicles()); + fp.put("notCheckedIn", vo.getVehicleStatus().getNotCheckedIn()); + fp.put("operatingVehicles", vo.getVehicleStatus().getOperatingVehicles()); + fp.put("completedVehicles", vo.getVehicleStatus().getCompletedVehicles()); + } + if (vo.getMonthlyTaskStatistics() != null) { + fp.put("taskTotal", vo.getMonthlyTaskStatistics().getTaskTotal()); + } + if (vo.getVehicles() != null) { + List> vehicles = new ArrayList<>(); + for (PlatformVehicleItemVO v : vo.getVehicles()) { + Map m = new LinkedHashMap<>(); + m.put("appointmentTime", v.getAppointmentTime()); + m.put("workFloor", v.getWorkFloor()); + m.put("plateNumber", v.getPlateNumber()); + m.put("status", v.getStatus()); + m.put("platformId", v.getPlatformId()); + m.put("platformDuration", v.getPlatformDuration()); + vehicles.add(m); + } + fp.put("vehicles", vehicles); + } + if (vo.getTaskLoadStatistics() != null) { + List> loads = new ArrayList<>(); + for (TaskLoadItemVO item : vo.getTaskLoadStatistics()) { + Map m = new LinkedHashMap<>(); + m.put("time", item.getTime()); + m.put("taskCount", item.getTaskCount()); + loads.add(m); + } + fp.put("taskLoadStatistics", loads); + } + return objectMapper.writeValueAsString(fp); + } + public List queryVehicles() { try { return biPlatformRealDataMapper.queryVehicles(); @@ -111,7 +207,8 @@ public class BiPlatformRealDataService { * 每次调用实时查库,不经过快照表。 */ public PlatformSurveillanceVO buildRealTimePlatformSurveillance() { - Random r = new Random(); + // 固定种子,保证写死字段每次生成值一致(真实字段随后实时覆盖) + Random r = new Random(20260825L); PlatformSurveillanceVO template = BiSnapshotWeeklyRandomDataBuilder.platformSurveillance(r); // 作业车辆列表 diff --git a/mhd-bi/src/main/java/com/mhd/bi/domain/biSnapshotSync/repository/mapper/BiSnapshotWriteMapper.java b/mhd-bi/src/main/java/com/mhd/bi/domain/biSnapshotSync/repository/mapper/BiSnapshotWriteMapper.java index 10d4dfcfa..bf895ebbe 100644 --- a/mhd-bi/src/main/java/com/mhd/bi/domain/biSnapshotSync/repository/mapper/BiSnapshotWriteMapper.java +++ b/mhd-bi/src/main/java/com/mhd/bi/domain/biSnapshotSync/repository/mapper/BiSnapshotWriteMapper.java @@ -13,6 +13,8 @@ public interface BiSnapshotWriteMapper { int insertPlatformSurveillanceSnapshot(@Param("payloadJson") String payloadJson, @Param("remark") String remark); + int updateLatestPlatformSurveillanceSnapshot(@Param("payloadJson") String payloadJson, @Param("remark") String remark); + int insertOverallOperationSnapshot(@Param("payloadJson") String payloadJson, @Param("remark") String remark); int insertWarehouseOperationZoneSnapshot(@Param("payloadJson") String payloadJson, @Param("remark") String remark); diff --git a/mhd-bi/src/main/java/com/mhd/bi/domain/biSnapshotSync/service/BiReportSnapshotSyncService.java b/mhd-bi/src/main/java/com/mhd/bi/domain/biSnapshotSync/service/BiReportSnapshotSyncService.java index 6df016cbf..b682590a2 100644 --- a/mhd-bi/src/main/java/com/mhd/bi/domain/biSnapshotSync/service/BiReportSnapshotSyncService.java +++ b/mhd-bi/src/main/java/com/mhd/bi/domain/biSnapshotSync/service/BiReportSnapshotSyncService.java @@ -150,7 +150,8 @@ public class BiReportSnapshotSyncService { /** TODO 业务落地:部分字段改为真实数据,其余仍写死。 */ protected PlatformSurveillanceVO buildPlatformSurveillanceSnapshot() { - Random r = new Random(); + // 固定种子,保证写死字段每次生成值一致(真实字段随后实时覆盖) + Random r = new Random(20260825L); // 写死数据复用原 builder PlatformSurveillanceVO template = BiSnapshotWeeklyRandomDataBuilder.platformSurveillance(r); diff --git a/mhd-bi/src/main/java/com/mhd/bi/interfaces/facadeApi/biReport/BiReportApi.java b/mhd-bi/src/main/java/com/mhd/bi/interfaces/facadeApi/biReport/BiReportApi.java index 4aa56c70f..6bb0ceb34 100644 --- a/mhd-bi/src/main/java/com/mhd/bi/interfaces/facadeApi/biReport/BiReportApi.java +++ b/mhd-bi/src/main/java/com/mhd/bi/interfaces/facadeApi/biReport/BiReportApi.java @@ -96,12 +96,12 @@ public class BiReportApi extends BaseController { } /** - * 月台监测指标查询(实时查 YMS 库,真实字段 + 写死字段) + * 月台监测指标查询(实时查 YMS 库,真实字段 + 写死字段),并落库一条到 BI_PLATFORM_SURVEILLANCE_SNAPSHOT */ - @ApiOperation(value = "月台监测指标查询", notes = "每次调用实时查询 YMS 库组装;部分字段为真实业务数据,部分为写死数据") + @ApiOperation(value = "月台监测指标查询", notes = "每次调用实时查询 YMS 库组装并写入快照表;部分字段为真实业务数据,部分为写死数据") @GetMapping("/platformSurveillance") public BiApiResult platformSurveillance() { - PlatformSurveillanceVO data = biPlatformRealDataService.buildRealTimePlatformSurveillance(); + PlatformSurveillanceVO data = biPlatformRealDataService.buildRealTimePlatformSurveillanceAndPersist(); return BiApiResult.ok(data); } //园区物流大屏接口---------------------------------------------------------------------- diff --git a/mhd-bi/src/main/resources/mapper/biSnapshotSync/BiSnapshotWriteMapper.xml b/mhd-bi/src/main/resources/mapper/biSnapshotSync/BiSnapshotWriteMapper.xml index 21529801a..affa48d86 100644 --- a/mhd-bi/src/main/resources/mapper/biSnapshotSync/BiSnapshotWriteMapper.xml +++ b/mhd-bi/src/main/resources/mapper/biSnapshotSync/BiSnapshotWriteMapper.xml @@ -18,6 +18,15 @@ values (#{payloadJson}, SYSDATE, SYSDATE, 1, #{remark}) + + update NGWL_TEST_BI.BI_PLATFORM_SURVEILLANCE_SNAPSHOT + set PAYLOAD_JSON = #{payloadJson}, + UPDATE_TIME = SYSDATE, + REMARK = #{remark} + where DEL_FLAG = 1 + and ID = (select max(t.ID) from NGWL_TEST_BI.BI_PLATFORM_SURVEILLANCE_SNAPSHOT t where t.DEL_FLAG = 1) + + insert into NGWL_TEST_BI.BI_OVERALL_OPERATION_SNAPSHOT (PAYLOAD_JSON, CREATE_TIME, UPDATE_TIME, DEL_FLAG, REMARK) values (#{payloadJson}, SYSDATE, SYSDATE, 1, #{remark}) From 09ab103d1d3a5b0913ba0a4eaa4cc31abcd29404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E9=B8=BF=E5=B1=95?= <18031053041@163.com> Date: Tue, 25 Aug 2026 20:18:31 +0800 Subject: [PATCH 09/20] 30 --- mhd-bi/src/main/resources/bootstrap.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mhd-bi/src/main/resources/bootstrap.yml b/mhd-bi/src/main/resources/bootstrap.yml index 8f1e2c236..376c66f95 100644 --- a/mhd-bi/src/main/resources/bootstrap.yml +++ b/mhd-bi/src/main/resources/bootstrap.yml @@ -14,19 +14,19 @@ spring: 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.5:6848 username: nacos password: manhuoda@2023 #线上正式环境 -# server-addr: 10.102.192.30:6848 + server-addr: 10.102.192.30: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.30:6848 username: nacos password: manhuoda@2023 #线上正式环境 From 940e4c56b054ad5b12b12a94c1dce9122b00d7f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E9=B8=BF=E5=B1=95?= <18031053041@163.com> Date: Tue, 25 Aug 2026 20:24:10 +0800 Subject: [PATCH 10/20] 31 --- mhd-bi/src/main/resources/bootstrap.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mhd-bi/src/main/resources/bootstrap.yml b/mhd-bi/src/main/resources/bootstrap.yml index 376c66f95..b949b746f 100644 --- a/mhd-bi/src/main/resources/bootstrap.yml +++ b/mhd-bi/src/main/resources/bootstrap.yml @@ -19,14 +19,14 @@ spring: username: nacos password: manhuoda@2023 #线上正式环境 - server-addr: 10.102.192.30:6848 + 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.102.192.31:6848 username: nacos password: manhuoda@2023 #线上正式环境 From 3c2f252347900ea4f0003769d1dad8783524e12b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E9=B8=BF=E5=B1=95?= <18031053041@163.com> Date: Tue, 25 Aug 2026 22:23:18 +0800 Subject: [PATCH 11/20] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/BiPlatformRealDataMapper.java | 4 ++++ .../service/BiPlatformRealDataService.java | 14 ++++++++++++++ .../interfaces/facadeApi/biReport/BiReportApi.java | 13 +++++++++++++ .../BiPlatformRealDataMapper.xml | 12 ++++++++++++ 4 files changed, 43 insertions(+) diff --git a/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/repository/mapper/BiPlatformRealDataMapper.java b/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/repository/mapper/BiPlatformRealDataMapper.java index 9fa3ed755..2e4b4e9fa 100644 --- a/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/repository/mapper/BiPlatformRealDataMapper.java +++ b/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/repository/mapper/BiPlatformRealDataMapper.java @@ -4,6 +4,7 @@ import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformVehiclePO; import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformOverviewPO; 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 java.util.List; @@ -31,4 +32,7 @@ public interface BiPlatformRealDataMapper { /** 任务负荷(今日 24 小时) */ List queryTaskLoadToday(); + + /** 今日预约-业务类型统计(按 businessName 分组统计今日预约数量) */ + List queryTodayBusinessTypeStats(); } \ No newline at end of file diff --git a/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/service/BiPlatformRealDataService.java b/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/service/BiPlatformRealDataService.java index efa81e648..073bd6d41 100644 --- a/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/service/BiPlatformRealDataService.java +++ b/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/service/BiPlatformRealDataService.java @@ -6,6 +6,7 @@ import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformVehiclePO; import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformOverviewPO; 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.biPlatformSurveillance.repository.mapper.BiPlatformSurveillanceReportMapper; import com.mhd.bi.domain.biSnapshotSync.repository.mapper.BiSnapshotWriteMapper; import com.mhd.bi.domain.biSnapshotSync.support.BiSnapshotWeeklyRandomDataBuilder; @@ -202,6 +203,19 @@ public class BiPlatformRealDataService { } } + /** + * 今日预约-业务类型统计:按业务类型分组统计今日预约数量。 + * 例:今日预约航空打板 3 条 → 返回 {businessName:"航空打板", count:3} + */ + public List queryTodayBusinessTypeStats() { + try { + return biPlatformRealDataMapper.queryTodayBusinessTypeStats(); + } catch (Exception e) { + log.error("【YMS】统计今日业务类型失败: {}", e.getMessage(), e); + return java.util.Collections.emptyList(); + } + } + /** * 实时组装月台监测数据:真实字段查 YMS 库,写死字段保留静态值。 * 每次调用实时查库,不经过快照表。 diff --git a/mhd-bi/src/main/java/com/mhd/bi/interfaces/facadeApi/biReport/BiReportApi.java b/mhd-bi/src/main/java/com/mhd/bi/interfaces/facadeApi/biReport/BiReportApi.java index 6bb0ceb34..e0c440b23 100644 --- a/mhd-bi/src/main/java/com/mhd/bi/interfaces/facadeApi/biReport/BiReportApi.java +++ b/mhd-bi/src/main/java/com/mhd/bi/interfaces/facadeApi/biReport/BiReportApi.java @@ -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.biPlatformSurveillance.service.BiPlatformSurveillanceReportService; import com.mhd.bi.domain.biPlatformRealData.service.BiPlatformRealDataService; +import com.mhd.bi.domain.biPlatformRealData.repository.po.RealBusinessTypeStatPO; import com.mhd.bi.domain.biOverallOperation.service.BiOverallOperationReportService; import com.mhd.bi.domain.biHkMacaoServiceZone.service.BiHkMacaoServiceZoneReportService; import com.mhd.bi.domain.biTransportOperationZone.service.BiTransportOperationZoneReportService; @@ -30,6 +31,8 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; +import java.util.List; + /** * BI 报表接口 */ @@ -104,6 +107,16 @@ public class BiReportApi extends BaseController { PlatformSurveillanceVO data = biPlatformRealDataService.buildRealTimePlatformSurveillanceAndPersist(); return BiApiResult.ok(data); } + + /** + * 今日预约-业务类型统计(实时查 YMS 库,不落库) + */ + @ApiOperation(value = "今日预约业务类型统计", notes = "按业务类型分组统计今日预约数量,实时查询 YMS 库,不落库;例:航空打板 3 条") + @GetMapping("/businessTypeStats") + public BiApiResult> businessTypeStats() { + List data = biPlatformRealDataService.queryTodayBusinessTypeStats(); + return BiApiResult.ok(data); + } //园区物流大屏接口---------------------------------------------------------------------- /** * 总体运营态势 diff --git a/mhd-bi/src/main/resources/mapper/biPlatformRealData/BiPlatformRealDataMapper.xml b/mhd-bi/src/main/resources/mapper/biPlatformRealData/BiPlatformRealDataMapper.xml index 6397c6612..0808e1907 100644 --- a/mhd-bi/src/main/resources/mapper/biPlatformRealData/BiPlatformRealDataMapper.xml +++ b/mhd-bi/src/main/resources/mapper/biPlatformRealData/BiPlatformRealDataMapper.xml @@ -65,6 +65,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND TO_CHAR(ENTRY_TIME, 'YYYY-MM') = TO_CHAR(SYSDATE, 'YYYY-MM') + + + - + From 8fe5e079ddbef9c75e7b501688d6bb0153504030 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E9=B8=BF=E5=B1=95?= <18031053041@163.com> Date: Wed, 26 Aug 2026 00:01:40 +0800 Subject: [PATCH 15/20] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=9C=88=E5=8F=B0?= =?UTF-8?q?=E9=A2=84=E7=BA=A6=E6=A5=BC=E5=B1=82=E8=BD=A6=E8=BE=86=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/BiPlatformRealDataMapper.java | 4 +++ .../po/RealPlatformFloorStatPO.java | 26 +++++++++++++++++++ .../service/BiPlatformRealDataService.java | 14 ++++++++++ .../facadeApi/biReport/BiReportApi.java | 11 ++++++++ .../BiPlatformRealDataMapper.xml | 22 ++++++++++++++++ 5 files changed, 77 insertions(+) create mode 100644 mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/repository/po/RealPlatformFloorStatPO.java diff --git a/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/repository/mapper/BiPlatformRealDataMapper.java b/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/repository/mapper/BiPlatformRealDataMapper.java index 2e4b4e9fa..1f283297c 100644 --- a/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/repository/mapper/BiPlatformRealDataMapper.java +++ b/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/repository/mapper/BiPlatformRealDataMapper.java @@ -5,6 +5,7 @@ import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformOverviewPO 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 java.util.List; @@ -35,4 +36,7 @@ public interface BiPlatformRealDataMapper { /** 今日预约-业务类型统计(按 businessName 分组统计今日预约数量) */ List queryTodayBusinessTypeStats(); + + /** 月台监控-按楼层统计月台车辆(楼层、月台数量、今日预约车辆、当前作业车辆) */ + List queryPlatformFloorStats(); } \ No newline at end of file diff --git a/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/repository/po/RealPlatformFloorStatPO.java b/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/repository/po/RealPlatformFloorStatPO.java new file mode 100644 index 000000000..c3c600faf --- /dev/null +++ b/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/repository/po/RealPlatformFloorStatPO.java @@ -0,0 +1,26 @@ +package com.mhd.bi.domain.biPlatformRealData.repository.po; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 月台监控-月台车辆统计(按楼层分组) + * 数据来源:TEST_NGWL_YMS.QMS_WINDOW_INFO(楼层+月台)与 QMS_MAIN_BUSINESS(当日预约/作业) + */ +@Data +public class RealPlatformFloorStatPO implements Serializable { + private static final long serialVersionUID = 1L; + + /** 楼层(从叫号月台 WINDOW_NAME 解析,如 S1-01 -> F1) */ + private String floorNo; + + /** 该楼层的月台数量 */ + private Long platformCount; + + /** 今日预约车辆数(按 WINDOW_NAME 关联楼层) */ + private Long todayReservedVehicles; + + /** 当前作业车辆数(FLOW_STATUS IN 5,6,7,8,9,10) */ + private Long operatingVehicles; +} diff --git a/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/service/BiPlatformRealDataService.java b/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/service/BiPlatformRealDataService.java index 073bd6d41..9e2470dc6 100644 --- a/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/service/BiPlatformRealDataService.java +++ b/mhd-bi/src/main/java/com/mhd/bi/domain/biPlatformRealData/service/BiPlatformRealDataService.java @@ -7,6 +7,7 @@ import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformOverviewPO 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.biPlatformSurveillance.repository.mapper.BiPlatformSurveillanceReportMapper; import com.mhd.bi.domain.biSnapshotSync.repository.mapper.BiSnapshotWriteMapper; import com.mhd.bi.domain.biSnapshotSync.support.BiSnapshotWeeklyRandomDataBuilder; @@ -216,6 +217,19 @@ public class BiPlatformRealDataService { } } + /** + * 月台监控-按楼层统计月台车辆:返回 {floorNo, platformCount, todayReservedVehicles, operatingVehicles} + * 实时查 YMS 库,不落库。 + */ + public List queryPlatformFloorStats() { + try { + return biPlatformRealDataMapper.queryPlatformFloorStats(); + } catch (Exception e) { + log.error("【YMS】月台监控按楼层统计失败: {}", e.getMessage(), e); + return java.util.Collections.emptyList(); + } + } + /** * 实时组装月台监测数据:真实字段查 YMS 库,写死字段保留静态值。 * 每次调用实时查库,不经过快照表。 diff --git a/mhd-bi/src/main/java/com/mhd/bi/interfaces/facadeApi/biReport/BiReportApi.java b/mhd-bi/src/main/java/com/mhd/bi/interfaces/facadeApi/biReport/BiReportApi.java index e0c440b23..0375dc7d6 100644 --- a/mhd-bi/src/main/java/com/mhd/bi/interfaces/facadeApi/biReport/BiReportApi.java +++ b/mhd-bi/src/main/java/com/mhd/bi/interfaces/facadeApi/biReport/BiReportApi.java @@ -5,6 +5,7 @@ import com.mhd.bi.domain.biComprehensive.service.BiComprehensiveReportService; import com.mhd.bi.domain.biPlatformSurveillance.service.BiPlatformSurveillanceReportService; 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.biOverallOperation.service.BiOverallOperationReportService; import com.mhd.bi.domain.biHkMacaoServiceZone.service.BiHkMacaoServiceZoneReportService; import com.mhd.bi.domain.biTransportOperationZone.service.BiTransportOperationZoneReportService; @@ -117,6 +118,16 @@ public class BiReportApi extends BaseController { List data = biPlatformRealDataService.queryTodayBusinessTypeStats(); return BiApiResult.ok(data); } + + /** + * 月台监控-按楼层统计月台车辆(实时查 YMS 库,不落库) + */ + @ApiOperation(value = "月台车辆统计(按楼层)", notes = "按楼层统计月台数量、今日预约车辆、当前作业车辆,实时查询 YMS 库,不落库") + @GetMapping("/platformFloorStats") + public BiApiResult> platformFloorStats() { + List data = biPlatformRealDataService.queryPlatformFloorStats(); + return BiApiResult.ok(data); + } //园区物流大屏接口---------------------------------------------------------------------- /** * 总体运营态势 diff --git a/mhd-bi/src/main/resources/mapper/biPlatformRealData/BiPlatformRealDataMapper.xml b/mhd-bi/src/main/resources/mapper/biPlatformRealData/BiPlatformRealDataMapper.xml index 826d95d47..4fc383635 100644 --- a/mhd-bi/src/main/resources/mapper/biPlatformRealData/BiPlatformRealDataMapper.xml +++ b/mhd-bi/src/main/resources/mapper/biPlatformRealData/BiPlatformRealDataMapper.xml @@ -77,6 +77,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ORDER BY COUNT(1) DESC + + + -