From 73e8e99ea6229f5dcf58223e5549627a397e9e0d Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Tue, 6 Aug 2024 09:56:40 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20IT=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?-=E5=A2=9E=E5=8A=A0=E5=9F=BA=E4=BA=8E=E9=98=9F=E5=88=97?= =?UTF-8?q?=E7=9A=84=E5=BC=82=E6=AD=A5=E4=B8=8A=E6=8A=A5=E5=B7=A5=E5=8D=95?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1212437796192256]IT服务-增加基于队列的异步上报工单方式 http://192.168.0.96:8090/demo/rdm.html#/story-detail/939050947543040/939050947543042/1212437796192256 --- ...rocessTaskAsyncCreateCrossoverService.java | 6 +- ...ocessTaskCreatePublicCrossoverService.java | 5 +- .../process/dto/ProcessTaskAsyncCreateVo.java | 27 +-- .../process/dto/ProcessTaskCreateVo.java | 168 ++++++++++++++++++ 4 files changed, 179 insertions(+), 27 deletions(-) create mode 100644 src/main/java/neatlogic/framework/process/dto/ProcessTaskCreateVo.java diff --git a/src/main/java/neatlogic/framework/process/crossover/IProcessTaskAsyncCreateCrossoverService.java b/src/main/java/neatlogic/framework/process/crossover/IProcessTaskAsyncCreateCrossoverService.java index 4afe0ee9..c3ca3862 100644 --- a/src/main/java/neatlogic/framework/process/crossover/IProcessTaskAsyncCreateCrossoverService.java +++ b/src/main/java/neatlogic/framework/process/crossover/IProcessTaskAsyncCreateCrossoverService.java @@ -18,13 +18,13 @@ package neatlogic.framework.process.crossover; import neatlogic.framework.crossover.ICrossoverService; -import neatlogic.framework.process.dto.ProcessTaskAsyncCreateVo; +import neatlogic.framework.process.dto.ProcessTaskCreateVo; public interface IProcessTaskAsyncCreateCrossoverService extends ICrossoverService { /** * 添加新的工单信息到阻塞队列 - * @param processTaskAsyncCreateVo + * @param processTaskCreateVo */ - Long addNewProcessTaskAsyncCreate(ProcessTaskAsyncCreateVo processTaskAsyncCreateVo); + Long addNewProcessTaskAsyncCreate(ProcessTaskCreateVo processTaskCreateVo); } diff --git a/src/main/java/neatlogic/framework/process/crossover/IProcessTaskCreatePublicCrossoverService.java b/src/main/java/neatlogic/framework/process/crossover/IProcessTaskCreatePublicCrossoverService.java index c20ae959..c43068a6 100644 --- a/src/main/java/neatlogic/framework/process/crossover/IProcessTaskCreatePublicCrossoverService.java +++ b/src/main/java/neatlogic/framework/process/crossover/IProcessTaskCreatePublicCrossoverService.java @@ -19,14 +19,15 @@ package neatlogic.framework.process.crossover; import com.alibaba.fastjson.JSONObject; import neatlogic.framework.crossover.ICrossoverService; +import neatlogic.framework.process.dto.ProcessTaskCreateVo; public interface IProcessTaskCreatePublicCrossoverService extends ICrossoverService { /** * 创建工单 * - * @param paramObj 创建工单所需参数 + * @param processTaskCreateVo 创建工单所需参数 * @return * @throws Exception */ - JSONObject createProcessTask(JSONObject paramObj) throws Exception; + JSONObject createProcessTask(ProcessTaskCreateVo processTaskCreateVo) throws Exception; } diff --git a/src/main/java/neatlogic/framework/process/dto/ProcessTaskAsyncCreateVo.java b/src/main/java/neatlogic/framework/process/dto/ProcessTaskAsyncCreateVo.java index 98a6fc72..2668d296 100644 --- a/src/main/java/neatlogic/framework/process/dto/ProcessTaskAsyncCreateVo.java +++ b/src/main/java/neatlogic/framework/process/dto/ProcessTaskAsyncCreateVo.java @@ -29,18 +29,10 @@ public class ProcessTaskAsyncCreateVo extends BaseEditorVo { private String status; private String error; private Integer serverId; - private JSONObject config; + private ProcessTaskCreateVo config; @JSONField(serialize = false) private String configStr; - private String tenantUuid; - - public ProcessTaskAsyncCreateVo() {} - - public ProcessTaskAsyncCreateVo(JSONObject config) { - this.config = config; - } - public Long getId() { if (id == null) { id = SnowflakeUtil.uniqueLong(); @@ -92,20 +84,20 @@ public class ProcessTaskAsyncCreateVo extends BaseEditorVo { this.serverId = serverId; } - public JSONObject getConfig() { + public ProcessTaskCreateVo getConfig() { if (config == null && configStr != null) { - config = JSONObject.parseObject(configStr); + config = JSONObject.parseObject(configStr, ProcessTaskCreateVo.class); } return config; } - public void setConfig(JSONObject config) { + public void setConfig(ProcessTaskCreateVo config) { this.config = config; } public String getConfigStr() { if (configStr == null && config != null) { - configStr = config.toJSONString(); + configStr = JSONObject.toJSONString(config); } return configStr; } @@ -113,13 +105,4 @@ public class ProcessTaskAsyncCreateVo extends BaseEditorVo { public void setConfigStr(String configStr) { this.configStr = configStr; } - - @Override - public String getTenantUuid() { - return tenantUuid; - } - - public void setTenantUuid(String tenantUuid) { - this.tenantUuid = tenantUuid; - } } diff --git a/src/main/java/neatlogic/framework/process/dto/ProcessTaskCreateVo.java b/src/main/java/neatlogic/framework/process/dto/ProcessTaskCreateVo.java new file mode 100644 index 00000000..b4ae5775 --- /dev/null +++ b/src/main/java/neatlogic/framework/process/dto/ProcessTaskCreateVo.java @@ -0,0 +1,168 @@ +/* + * Copyright (C) 2024 深圳极向量科技有限公司 All Rights Reserved. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package neatlogic.framework.process.dto; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; + +public class ProcessTaskCreateVo { + private String channel; + private String title; + private String owner; + private String reporter; + private String priority; + private JSONArray formAttributeDataList; + private JSONArray hidecomponentList; + private JSONArray readcomponentList; + private String content; + private String filePathPrefix; + private JSONArray filePathList; + private String fileIdList; + private JSONObject handlerStepInfo; + private String source; + private String region; + private Long newProcessTaskId; + + public String getChannel() { + return channel; + } + + public void setChannel(String channel) { + this.channel = channel; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getOwner() { + return owner; + } + + public void setOwner(String owner) { + this.owner = owner; + } + + public String getReporter() { + return reporter; + } + + public void setReporter(String reporter) { + this.reporter = reporter; + } + + public String getPriority() { + return priority; + } + + public void setPriority(String priority) { + this.priority = priority; + } + + public JSONArray getFormAttributeDataList() { + return formAttributeDataList; + } + + public void setFormAttributeDataList(JSONArray formAttributeDataList) { + this.formAttributeDataList = formAttributeDataList; + } + + public JSONArray getHidecomponentList() { + return hidecomponentList; + } + + public void setHidecomponentList(JSONArray hidecomponentList) { + this.hidecomponentList = hidecomponentList; + } + + public JSONArray getReadcomponentList() { + return readcomponentList; + } + + public void setReadcomponentList(JSONArray readcomponentList) { + this.readcomponentList = readcomponentList; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public String getFilePathPrefix() { + return filePathPrefix; + } + + public void setFilePathPrefix(String filePathPrefix) { + this.filePathPrefix = filePathPrefix; + } + + public JSONArray getFilePathList() { + return filePathList; + } + + public void setFilePathList(JSONArray filePathList) { + this.filePathList = filePathList; + } + + public String getFileIdList() { + return fileIdList; + } + + public void setFileIdList(String fileIdList) { + this.fileIdList = fileIdList; + } + + public JSONObject getHandlerStepInfo() { + return handlerStepInfo; + } + + public void setHandlerStepInfo(JSONObject handlerStepInfo) { + this.handlerStepInfo = handlerStepInfo; + } + + public String getSource() { + return source; + } + + public void setSource(String source) { + this.source = source; + } + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public Long getNewProcessTaskId() { + return newProcessTaskId; + } + + public void setNewProcessTaskId(Long newProcessTaskId) { + this.newProcessTaskId = newProcessTaskId; + } +} -- Gitee From 1a5e4551c6ae2d525c01d97388a1a169fd5346ad Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Thu, 8 Aug 2024 10:16:56 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20IT=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?-=E5=A2=9E=E5=8A=A0=E5=9F=BA=E4=BA=8E=E9=98=9F=E5=88=97?= =?UTF-8?q?=E7=9A=84=E5=BC=82=E6=AD=A5=E4=B8=8A=E6=8A=A5=E5=B7=A5=E5=8D=95?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1212437796192256]IT服务-增加基于队列的异步上报工单方式 http://192.168.0.96:8090/demo/rdm.html#/story-detail/939050947543040/939050947543042/1212437796192256 --- .../crossover/IProcessTaskCreatePublicCrossoverService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/neatlogic/framework/process/crossover/IProcessTaskCreatePublicCrossoverService.java b/src/main/java/neatlogic/framework/process/crossover/IProcessTaskCreatePublicCrossoverService.java index c43068a6..8262324c 100644 --- a/src/main/java/neatlogic/framework/process/crossover/IProcessTaskCreatePublicCrossoverService.java +++ b/src/main/java/neatlogic/framework/process/crossover/IProcessTaskCreatePublicCrossoverService.java @@ -29,5 +29,5 @@ public interface IProcessTaskCreatePublicCrossoverService extends ICrossoverServ * @return * @throws Exception */ - JSONObject createProcessTask(ProcessTaskCreateVo processTaskCreateVo) throws Exception; + Long createProcessTask(ProcessTaskCreateVo processTaskCreateVo) throws Exception; } -- Gitee