From 64f046ed41c2ae607dc065c82b6d454f64e90584 Mon Sep 17 00:00:00 2001 From: whyclxw <810412026@qq.com> Date: 星期四, 19 六月 2025 21:52:33 +0800 Subject: [PATCH] 预警分析管理-电源告警 --- src/main/java/com/whyc/controller/WorkflowMainController.java | 85 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 85 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/whyc/controller/WorkflowMainController.java b/src/main/java/com/whyc/controller/WorkflowMainController.java new file mode 100644 index 0000000..5b15efa --- /dev/null +++ b/src/main/java/com/whyc/controller/WorkflowMainController.java @@ -0,0 +1,85 @@ +package com.whyc.controller; + +import com.github.pagehelper.PageInfo; +import com.whyc.dto.Response; +import com.whyc.pojo.db_user.User; +import com.whyc.pojo.web_site.WorkflowMain; +import com.whyc.service.WorkflowLinkService; +import com.whyc.service.WorkflowMainService; +import com.whyc.util.ActionUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; + +@RestController +@RequestMapping("workflowMain") +@Api(tags = "鍗曟嵁瀹℃壒") +public class WorkflowMainController { + + @Autowired + private WorkflowMainService service; + + @PostMapping("submit") + @ApiOperation(value = "鎻愪氦鍗曟嵁", notes = "浼犲弬:taskDesc,mainType,mainTypeCN,mainTypeEn,dealRoleId,processLevel") + public Response<Integer> submit(@RequestBody WorkflowMain main){ + return service.submit(main); + } + + + @GetMapping("basicInfo") + @ApiOperation(value = "宸ュ崟鍩烘湰鐘舵��") + public Response<WorkflowMain> getBasicInfo(@RequestParam Integer mainId){ + return new Response<WorkflowMain>().set(1,service.getBaseInfo(mainId)); + } + + //鏈汉鐨勫崟鎹�: 宸插鎵�,瀹℃壒涓�,宸叉挙閿�,宸查┏鍥� + //鎺ユ敹鍒扮殑鍗曟嵁: 寰呭鏍�,(寰呮帴鍗曞鏍�?),宸插鏍� + + /** + * 鏈汉鐨勫崟鎹�: + * 宸插鎵�,瀹℃壒涓�,宸叉挙閿�,宸查┏鍥� + * */ + @GetMapping("ownStatistics") + @ApiOperation(value = "鏈汉鐨勫崟鎹粺璁�",notes = "status鍚箟:1-瀹℃壒涓�,2-瀹℃壒瀹屾垚涓旈�氳繃,3-瀹℃壒瀹屾垚涓旈┏鍥�") + public Response<Map<Integer,Integer>> getOwnStatistics(int type){ + int userId = ActionUtil.getUser().getId().intValue(); + return service.getOwnStatistics(userId,type); + } + + /** + * 鏈汉鐨勫崟鎹�: + * 宸插鎵�,瀹℃壒涓�,宸叉挙閿�,宸查┏鍥� + * */ + @GetMapping("ownListPage") + @ApiOperation(value = "鏈汉鐨勫崟鎹垪琛ㄥ垎椤�",notes = "status浼犲弬:0:鍏ㄩ儴,1-瀹℃壒涓�,2-瀹℃壒瀹屾垚涓旈�氳繃,3-瀹℃壒瀹屾垚涓旈┏鍥�") + public Response<PageInfo<WorkflowMain>> ownListPage(int type,int status,int pageNum,int pageSize){ + int userId = ActionUtil.getUser().getId().intValue(); + return service.ownListPage(userId,type,status,pageNum,pageSize); + } + + /** + * 鎺ユ敹鍒扮殑鍗曟嵁: + * 鏀剧數璁″垝涓存椂琛ㄤ腑瀛樺湪: 寰呭鏍�,寰呮帴鍗曞鏍�,宸插鏍� + * */ + @GetMapping("receivedStatistics") + @ApiOperation(value = "鎺ユ敹鍒扮殑鍗曟嵁缁熻",notes = "status鍚箟:1-寰呮帴鍗�,6-寰呭鏍�,58-宸插鏍�") + public Response<Map<Integer,Integer>> getReceivedStatistics(int type){ + User user = ActionUtil.getUser(); + return service.getReceivedStatistics(type,user); + } + + /** + * 鎺ユ敹鍒扮殑鍗曟嵁: + * 鏀剧數璁″垝涓存椂琛ㄤ腑瀛樺湪: 寰呭鏍�,寰呮帴鍗曞鏍�,宸插鏍� + */ + @GetMapping("receivedListPage") + @ApiOperation(value = "鎺ユ敹鍒扮殑鍗曟嵁鍒楄〃鍒嗛〉", notes = "status浼犲弬:0-鍏ㄩ儴,1-寰呮帴鍗�,6-寰呭鏍�,5|8-宸插鏍�(閫氳繃|椹冲洖)") + public Response<PageInfo<WorkflowMain>> getReceivedListPage(int type, int status, int pageNum, int pageSize) { + User user = ActionUtil.getUser(); + return service.getReceivedListPage(type, status, user, pageNum, pageSize); + } + +} -- Gitblit v1.9.1