From 5fe490447ef5d2315547348c8320e36b3040e003 Mon Sep 17 00:00:00 2001 From: linbangquan <1437892690@qq.com> Date: Thu, 14 Mar 2024 17:20:47 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E7=A7=81=E6=9C=89=E7=9A=84=E4=B8=8A=E6=8A=A5?= =?UTF-8?q?=E5=B7=A5=E5=8D=95(=E4=BE=9B=E7=AC=AC=E4=B8=89=E6=96=B9?= =?UTF-8?q?=E4=BD=BF=E7=94=A8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1112320942505984]新增一个私有的上报工单(供第三方使用) http://192.168.0.96:8090/demo/rdm.html#/story-detail/939050947543040/939050947543042/1112320942505984 --- .../api/processtask/ProcessTaskCreateApi.java | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 src/main/java/neatlogic/module/process/api/processtask/ProcessTaskCreateApi.java diff --git a/src/main/java/neatlogic/module/process/api/processtask/ProcessTaskCreateApi.java b/src/main/java/neatlogic/module/process/api/processtask/ProcessTaskCreateApi.java new file mode 100644 index 000000000..eff2ba716 --- /dev/null +++ b/src/main/java/neatlogic/module/process/api/processtask/ProcessTaskCreateApi.java @@ -0,0 +1,60 @@ +package neatlogic.module.process.api.processtask; + +import com.alibaba.fastjson.JSONObject; +import neatlogic.framework.common.constvalue.ApiParamType; +import neatlogic.framework.restful.annotation.*; +import neatlogic.framework.restful.constvalue.OperationTypeEnum; +import neatlogic.framework.restful.core.privateapi.PrivateApiComponentBase; +import neatlogic.module.process.service.ProcessTaskCreatePublicService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; + +@Service +@OperationType(type = OperationTypeEnum.UPDATE) +public class ProcessTaskCreateApi extends PrivateApiComponentBase { + + + @Resource + private ProcessTaskCreatePublicService processTaskCreatePublicService; + + @Override + public String getToken() { + return "processtask/create"; + } + + @Override + public String getName() { + return "nmpap.processtaskcreateapi.getname"; + } + + @Override + public String getConfig() { + return null; + } + + @SuppressWarnings("unchecked") + @Input({ + @Param(name = "channel", type = ApiParamType.STRING, isRequired = true, desc = "term.itsm.channel", help = "支持channelUuid和channelName入参"), + @Param(name = "title", type = ApiParamType.STRING, isRequired = true, maxLength = 80, desc = "common.title"), + @Param(name = "owner", type = ApiParamType.STRING, isRequired = true, desc = "term.itsm.owner", help = "上报人uuid和上报人id入参"), + @Param(name = "reporter", type = ApiParamType.STRING, desc = "term.itsm.reporter"), + @Param(name = "priority", type = ApiParamType.STRING, isRequired = true, desc = "common.priority"), + @Param(name = "formAttributeDataList", type = ApiParamType.JSONARRAY, desc = "term.itsm.formattributedatalist"), + @Param(name = "hidecomponentList", type = ApiParamType.JSONARRAY, desc = "term.itsm.hidecomponentlist"), + @Param(name = "readcomponentList", type = ApiParamType.JSONARRAY, desc = "term.itsm.readcomponentlist"), + @Param(name = "content", type = ApiParamType.STRING, desc = "common.content"), + @Param(name = "fileIdList", type = ApiParamType.JSONARRAY, desc = "common.fileidlist"), + @Param(name = "handlerStepInfo", type = ApiParamType.JSONOBJECT, desc = "term.itsm.handlerstepinfo"), + @Param(name = "source", type = ApiParamType.STRING, desc = "common.source") + }) + @Output({ + @Param(name = "processTaskId", type = ApiParamType.LONG, desc = "term.itsm.processtaskid") + }) + @Example(example = "{\"title\":\"test上报2\",\"channel\":\"linbq_1206_1119\",\"owner\":\"admin\",\"priority\":\"普通\",\"formAttributeDataList\":[{\"label\":\"下拉框_1\",\"dataList\":[\"ezproxy\",\"balantflow\"]},{\"label\":\"下拉框_2\",\"dataList\":[\"a2\",\"a1\"]},{\"label\":\"下拉框_3\",\"dataList\":[\"子系统描述_1\",\"子系统描述_2\",\"子系统描述_3\"]},{\"label\":\"下拉框_4\",\"dataList\":[\"闫雅\",\"陈宁\",\"蒋琪\"]}]}") + @Description(desc = "nmpap.processtaskcreateapi.getname") + @Override + public Object myDoService(JSONObject jsonObj) throws Exception { + return processTaskCreatePublicService.createProcessTask(jsonObj); + } +} -- Gitee