From 238023b118d58bfa5e45e941e8edd1b6adefef88 Mon Sep 17 00:00:00 2001 From: xiepeng Date: Fri, 19 Jan 2024 11:30:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A8=E7=81=AB=E4=BD=9C=E4=B8=9A=20?= =?UTF-8?q?=E8=A1=A5=E5=85=85=20=E5=8F=96=E6=B6=88=EF=BC=8C=E4=B8=8B?= =?UTF-8?q?=E4=B8=80=E6=AD=A5=EF=BC=8C=E9=AA=8C=E6=94=B6=E5=BD=92=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eightwork/AppHotworkController.java | 43 +++++++++++++++++-- .../datasource/eightwork/HotworkMapper.java | 2 +- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/zcloud/controller/eightwork/AppHotworkController.java b/src/main/java/com/zcloud/controller/eightwork/AppHotworkController.java index 65f0eef..4f15f84 100644 --- a/src/main/java/com/zcloud/controller/eightwork/AppHotworkController.java +++ b/src/main/java/com/zcloud/controller/eightwork/AppHotworkController.java @@ -16,7 +16,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; import java.text.DecimalFormat; import java.util.*; @@ -28,6 +30,7 @@ import java.util.*; @Controller @RequestMapping("/app/hotwork") public class AppHotworkController extends BaseController { + @Autowired private HotworkService hotworkService; @@ -47,7 +50,6 @@ public class AppHotworkController extends BaseController { PageData pd = new PageData(); pd = this.getPageData(); hotworkService.save(pd); - map.put("result", errInfo); return map; } @@ -95,13 +97,48 @@ public class AppHotworkController extends BaseController { @ResponseBody public Object findById() throws Exception { Map map = new HashMap<>(); - String errorInfo = "success"; + String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); pd = hotworkService.findById(pd); - map.put("result",errorInfo); + map.put("result",errInfo); map.put("page",pd); return map; } + @RequestMapping("/cancel") + @ResponseBody + public Object cancel()throws Exception{ + Map map = new HashMap<>(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + hotworkService.cancel(pd); + map.put("result",errInfo); + return map; + } + + @RequestMapping("/nextStep") + @ResponseBody + public Object nextStep(@RequestParam(value="file",required=false) MultipartFile file) throws Exception { + Map map = new HashMap<>(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + hotworkService.nextStep(pd, file); + map.put("result",errInfo); + return map; + } + + @RequestMapping("/accept") + @ResponseBody + public Object accept() throws Exception { + Map map = new HashMap<>(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + hotworkService.accept(pd); + map.put("result",errInfo); + return map; + } } diff --git a/src/main/java/com/zcloud/mapper/datasource/eightwork/HotworkMapper.java b/src/main/java/com/zcloud/mapper/datasource/eightwork/HotworkMapper.java index 223f7b3..1fab69d 100644 --- a/src/main/java/com/zcloud/mapper/datasource/eightwork/HotworkMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/eightwork/HotworkMapper.java @@ -17,5 +17,5 @@ public interface HotworkMapper { void edit(PageData pd); void editStep(PageData pd); List datalistPage(Page page); - + void cancel(PageData pd); }