|
|
@@ -7,10 +7,7 @@ import com.uas.dfs.service.FileClient;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.ui.ModelMap;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
@@ -36,7 +33,7 @@ public class OrgController {
|
|
|
* 发起机构,有草稿取出草稿,没有草稿就新增
|
|
|
*/
|
|
|
@ResponseBody
|
|
|
- @RequestMapping("/show")
|
|
|
+ @RequestMapping(value = "/show",method = RequestMethod.GET)
|
|
|
public Org show(Long uuid){
|
|
|
return orgService.show(uuid);
|
|
|
}
|
|
|
@@ -92,7 +89,7 @@ public class OrgController {
|
|
|
*提交机构申请
|
|
|
*/
|
|
|
@ResponseBody
|
|
|
- @RequestMapping("/submit")
|
|
|
+ @RequestMapping(value = "/submit",method = RequestMethod.POST)
|
|
|
public Org submit(@RequestParam(required = false) MultipartFile logo,
|
|
|
@RequestParam(required = false) MultipartFile certificate,
|
|
|
@RequestParam(required = false) MultipartFile personCertificate,
|
|
|
@@ -142,8 +139,8 @@ public class OrgController {
|
|
|
* 查询某一机构详情信息
|
|
|
*/
|
|
|
@ResponseBody
|
|
|
- @RequestMapping("/detail")
|
|
|
- public Org detail(Long id){
|
|
|
+ @RequestMapping(value = "/detail/{id}",method = RequestMethod.GET)
|
|
|
+ public Org detail(@PathVariable("id") Long id){
|
|
|
return orgService.findOne(id);
|
|
|
}
|
|
|
|
|
|
@@ -151,8 +148,8 @@ public class OrgController {
|
|
|
* 批准机构申请
|
|
|
*/
|
|
|
@ResponseBody
|
|
|
- @RequestMapping("/approve")
|
|
|
- public Org approve(Long id){
|
|
|
+ @RequestMapping(value = "/approve/{id}",method = RequestMethod.POST)
|
|
|
+ public Org approve(@PathVariable("id") Long id){
|
|
|
return orgService.approve(id);
|
|
|
}
|
|
|
|
|
|
@@ -160,8 +157,8 @@ public class OrgController {
|
|
|
* 拒绝机构申请
|
|
|
*/
|
|
|
@ResponseBody
|
|
|
- @RequestMapping("/unapprove")
|
|
|
- public Org unapprove(Long id,String refuse){
|
|
|
+ @RequestMapping(value = "/unapprove/{id}",method = RequestMethod.POST)
|
|
|
+ public Org unapprove(@PathVariable("id") Long id,String refuse){
|
|
|
return orgService.unapprove(id,refuse);
|
|
|
}
|
|
|
|
|
|
@@ -171,7 +168,7 @@ public class OrgController {
|
|
|
* 默认展示已审核的机构信息
|
|
|
*/
|
|
|
@ResponseBody
|
|
|
- @RequestMapping("/showOrgs")
|
|
|
+ @RequestMapping(value = "/showOrgs",method = RequestMethod.GET)
|
|
|
public List<Org> showOrgs(@RequestParam(defaultValue ="0") Integer type, @RequestParam(defaultValue="0") Integer majorArea, @RequestParam(defaultValue="1")Integer status) {
|
|
|
if (type == 0 && majorArea != 0) {
|
|
|
return orgService.findByMajorArea(majorArea,status);
|
|
|
@@ -187,7 +184,7 @@ public class OrgController {
|
|
|
|
|
|
//根据搜索框查询机构信息
|
|
|
@ResponseBody
|
|
|
- @RequestMapping("/search")
|
|
|
+ @RequestMapping(value = "/search",method = RequestMethod.GET)
|
|
|
public List<Org> search(String search){
|
|
|
return orgService.search(search);
|
|
|
}
|