Merge remote-tracking branch 'origin/dev' into dev

pull/4/head
fangjiakai 2024-01-19 11:32:43 +08:00
commit 17f8e83c3d
2 changed files with 41 additions and 4 deletions

View File

@ -16,7 +16,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping; 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.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.util.*; import java.util.*;
@ -28,6 +30,7 @@ import java.util.*;
@Controller @Controller
@RequestMapping("/app/hotwork") @RequestMapping("/app/hotwork")
public class AppHotworkController extends BaseController { public class AppHotworkController extends BaseController {
@Autowired @Autowired
private HotworkService hotworkService; private HotworkService hotworkService;
@ -47,7 +50,6 @@ public class AppHotworkController extends BaseController {
PageData pd = new PageData(); PageData pd = new PageData();
pd = this.getPageData(); pd = this.getPageData();
hotworkService.save(pd); hotworkService.save(pd);
map.put("result", errInfo); map.put("result", errInfo);
return map; return map;
} }
@ -95,13 +97,48 @@ public class AppHotworkController extends BaseController {
@ResponseBody @ResponseBody
public Object findById() throws Exception { public Object findById() throws Exception {
Map<String,Object> map = new HashMap<>(); Map<String,Object> map = new HashMap<>();
String errorInfo = "success"; String errInfo = "success";
PageData pd = new PageData(); PageData pd = new PageData();
pd = this.getPageData(); pd = this.getPageData();
pd = hotworkService.findById(pd); pd = hotworkService.findById(pd);
map.put("result",errorInfo); map.put("result",errInfo);
map.put("page",pd); map.put("page",pd);
return map; return map;
} }
@RequestMapping("/cancel")
@ResponseBody
public Object cancel()throws Exception{
Map<String, Object> 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<String,Object> 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<String,Object> map = new HashMap<>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
hotworkService.accept(pd);
map.put("result",errInfo);
return map;
}
} }

View File

@ -17,5 +17,5 @@ public interface HotworkMapper {
void edit(PageData pd); void edit(PageData pd);
void editStep(PageData pd); void editStep(PageData pd);
List<PageData> datalistPage(Page page); List<PageData> datalistPage(Page page);
void cancel(PageData pd);
} }