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); }