From 3a0eae4aebfe1c8878b7d1786f7e885293cef631 Mon Sep 17 00:00:00 2001 From: Lemon Date: Tue, 5 Dec 2023 09:06:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=20=E5=90=8E=E7=AE=A1?= =?UTF-8?q?=E7=AC=AC=E4=B8=89=E6=96=B9=E5=B9=B3=E5=8F=B0=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ThirdPartyPlatformConfigController.java | 22 +- .../handler/UploadRealTimeMonitorHandler.java | 10 +- .../yunkuaichong/NettyServerHandler.java | 2 +- .../src/api/thirdParty/thirdPartyConfig.js | 44 +++ .../thirdParty/thirdPartyConfig/index.vue | 323 ++++++++++++++++++ 5 files changed, 384 insertions(+), 17 deletions(-) rename jsowell-admin/src/main/java/com/jsowell/web/controller/{pile => thirdparty}/ThirdPartyPlatformConfigController.java (87%) create mode 100644 jsowell-ui/src/api/thirdParty/thirdPartyConfig.js create mode 100644 jsowell-ui/src/views/thirdParty/thirdPartyConfig/index.vue diff --git a/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/ThirdPartyPlatformConfigController.java b/jsowell-admin/src/main/java/com/jsowell/web/controller/thirdparty/ThirdPartyPlatformConfigController.java similarity index 87% rename from jsowell-admin/src/main/java/com/jsowell/web/controller/pile/ThirdPartyPlatformConfigController.java rename to jsowell-admin/src/main/java/com/jsowell/web/controller/thirdparty/ThirdPartyPlatformConfigController.java index 405490483..a8fc7149f 100644 --- a/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/ThirdPartyPlatformConfigController.java +++ b/jsowell-admin/src/main/java/com/jsowell/web/controller/thirdparty/ThirdPartyPlatformConfigController.java @@ -1,8 +1,11 @@ -package com.jsowell.web.controller.pile; +package com.jsowell.web.controller.thirdparty; import java.util.List; import javax.servlet.http.HttpServletResponse; +import com.jsowell.common.util.poi.ExcelUtil; +import com.jsowell.pile.domain.ThirdPartyPlatformConfig; +import com.jsowell.pile.service.IThirdPartyPlatformConfigService; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -17,9 +20,6 @@ import com.jsowell.common.annotation.Log; import com.jsowell.common.core.controller.BaseController; import com.jsowell.common.core.domain.AjaxResult; import com.jsowell.common.enums.BusinessType; -import com.jsowell.pile.domain.ThirdPartyPlatformConfig; -import com.jsowell.pile.service.IThirdPartyPlatformConfigService; -import com.jsowell.common.util.poi.ExcelUtil; import com.jsowell.common.core.page.TableDataInfo; /** @@ -29,7 +29,7 @@ import com.jsowell.common.core.page.TableDataInfo; * @date 2023-05-27 */ @RestController -@RequestMapping("/pile/config") +@RequestMapping("/thirdParty/thirdPartyConfig") public class ThirdPartyPlatformConfigController extends BaseController { @Autowired private IThirdPartyPlatformConfigService thirdPartyPlatformConfigService; @@ -37,7 +37,7 @@ public class ThirdPartyPlatformConfigController extends BaseController { /** * 查询对接平台配置信息列表 */ - @PreAuthorize("@ss.hasPermi('pile:config:list')") + @PreAuthorize("@ss.hasPermi('thirdParty:thirdPartyConfig:list')") @GetMapping("/list") public TableDataInfo list(ThirdPartyPlatformConfig thirdPartyPlatformConfig) { startPage(); @@ -48,7 +48,7 @@ public class ThirdPartyPlatformConfigController extends BaseController { /** * 导出对接平台配置信息列表 */ - @PreAuthorize("@ss.hasPermi('pile:config:export')") + @PreAuthorize("@ss.hasPermi('thirdParty:thirdPartyConfig:export')") @Log(title = "对接平台配置信息", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, ThirdPartyPlatformConfig thirdPartyPlatformConfig) { @@ -60,7 +60,7 @@ public class ThirdPartyPlatformConfigController extends BaseController { /** * 获取对接平台配置信息详细信息 */ - @PreAuthorize("@ss.hasPermi('pile:config:query')") + @PreAuthorize("@ss.hasPermi('thirdParty:thirdPartyConfig:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Integer id) { return AjaxResult.success(thirdPartyPlatformConfigService.selectThirdPartyPlatformConfigById(id)); @@ -69,7 +69,7 @@ public class ThirdPartyPlatformConfigController extends BaseController { /** * 新增对接平台配置信息 */ - @PreAuthorize("@ss.hasPermi('pile:config:add')") + @PreAuthorize("@ss.hasPermi('thirdParty:thirdPartyConfig:add')") @Log(title = "对接平台配置信息", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody ThirdPartyPlatformConfig thirdPartyPlatformConfig) { @@ -79,7 +79,7 @@ public class ThirdPartyPlatformConfigController extends BaseController { /** * 修改对接平台配置信息 */ - @PreAuthorize("@ss.hasPermi('pile:config:edit')") + @PreAuthorize("@ss.hasPermi('thirdParty:thirdPartyConfig:edit')") @Log(title = "对接平台配置信息", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody ThirdPartyPlatformConfig thirdPartyPlatformConfig) { @@ -89,7 +89,7 @@ public class ThirdPartyPlatformConfigController extends BaseController { /** * 删除对接平台配置信息 */ - @PreAuthorize("@ss.hasPermi('pile:config:remove')") + @PreAuthorize("@ss.hasPermi('thirdParty:thirdPartyConfig:remove')") @Log(title = "对接平台配置信息", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Integer[] ids) { diff --git a/jsowell-netty/src/main/java/com/jsowell/netty/handler/UploadRealTimeMonitorHandler.java b/jsowell-netty/src/main/java/com/jsowell/netty/handler/UploadRealTimeMonitorHandler.java index c5d35ac86..adceb1b52 100644 --- a/jsowell-netty/src/main/java/com/jsowell/netty/handler/UploadRealTimeMonitorHandler.java +++ b/jsowell-netty/src/main/java/com/jsowell/netty/handler/UploadRealTimeMonitorHandler.java @@ -315,11 +315,11 @@ public class UploadRealTimeMonitorHandler extends AbstractHandler { // 推送第三方平台,先通过桩编号查出站点信息 PileBasicInfo pileBasicInfo = pileBasicInfoService.selectPileBasicInfoBySN(pileSn); - Map pileStatusMap = pileConnectorInfoService.getPileStatus(Lists.newArrayList(pileSn)); - String pileStatus = pileStatusMap.get(pileSn); - if (StringUtils.equals(connectorStatus, pileStatus)) { - return null; - } + // Map pileStatusMap = pileConnectorInfoService.getPileStatus(Lists.newArrayList(pileSn)); + // String pileStatus = pileStatusMap.get(pileSn); + // if (StringUtils.equals(connectorStatus, pileStatus)) { + // return null; + // } // 状态不一样,传给第三方平台 // 查询该站点是否推送第三方平台 ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); diff --git a/jsowell-netty/src/main/java/com/jsowell/netty/server/yunkuaichong/NettyServerHandler.java b/jsowell-netty/src/main/java/com/jsowell/netty/server/yunkuaichong/NettyServerHandler.java index af777936c..d5c148450 100644 --- a/jsowell-netty/src/main/java/com/jsowell/netty/server/yunkuaichong/NettyServerHandler.java +++ b/jsowell-netty/src/main/java/com/jsowell/netty/server/yunkuaichong/NettyServerHandler.java @@ -208,7 +208,7 @@ public class NettyServerHandler extends ChannelInboundHandlerAdapter { // close(channelId, pileSn); } - private void close(ChannelId channelId, String pileSn) { + private void close(ChannelId channelId, String pileSn, ChannelHandlerContext ctx) { log.error("close方法-发生异常,关闭链接,channelId:{}, pileSn:{}", channelId.asShortText(), pileSn); // 删除桩编号和channel的关系 diff --git a/jsowell-ui/src/api/thirdParty/thirdPartyConfig.js b/jsowell-ui/src/api/thirdParty/thirdPartyConfig.js new file mode 100644 index 000000000..90c621f06 --- /dev/null +++ b/jsowell-ui/src/api/thirdParty/thirdPartyConfig.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询对接平台配置信息列表 +export function listThirdPartyConfig(query) { + return request({ + url: '/thirdParty/thirdPartyConfig/list', + method: 'get', + params: query + }) +} + +// 查询对接平台配置信息详细 +export function getThirdPartyConfig(id) { + return request({ + url: '/thirdParty/thirdPartyConfig/' + id, + method: 'get' + }) +} + +// 新增对接平台配置信息 +export function addThirdPartyConfig(data) { + return request({ + url: '/thirdParty/thirdPartyConfig', + method: 'post', + data: data + }) +} + +// 修改对接平台配置信息 +export function updateThirdPartyConfig(data) { + return request({ + url: '/thirdParty/thirdPartyConfig', + method: 'put', + data: data + }) +} + +// 删除对接平台配置信息 +export function delThirdPartyConfig(id) { + return request({ + url: '/thirdParty/thirdPartyConfig/' + id, + method: 'delete' + }) +} diff --git a/jsowell-ui/src/views/thirdParty/thirdPartyConfig/index.vue b/jsowell-ui/src/views/thirdParty/thirdPartyConfig/index.vue new file mode 100644 index 000000000..eee4b0b56 --- /dev/null +++ b/jsowell-ui/src/views/thirdParty/thirdPartyConfig/index.vue @@ -0,0 +1,323 @@ + + +