beb2540bd753d8bf477218fdfd8997d84d1a229c.svn-base
4.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/**
* Copyright © 2015-2018 <a href="#">J-Site</a> All rights reserved.
*/
package com.thinkgem.jeesite.modules.ycsl.web;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
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.servlet.mvc.support.RedirectAttributes;
import com.thinkgem.jeesite.common.config.Global;
import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.web.BaseController;
import com.thinkgem.jeesite.common.utils.StringUtils;
import com.thinkgem.jeesite.modules.reg.entity.bus.RegBusSjmain;
import com.thinkgem.jeesite.modules.ycsl.entity.YcslSj;
import com.thinkgem.jeesite.modules.ycsl.service.YcslSjService;
/**
* 一窗受理-收件材料Controller
* @author lzj
* @version 2020-12-26
*/
@Controller
@RequestMapping(value = "${adminPath}/ycsl/ycslSj")
public class YcslSjController extends BaseController {
@Autowired
private YcslSjService ycslSjService;
@ModelAttribute
public YcslSj get(@RequestParam(required=false) String id) {
YcslSj entity = null;
if (StringUtils.isNotBlank(id)){
entity = ycslSjService.get(id);
}
if (entity == null){
entity = new YcslSj();
}
return entity;
}
@RequiresPermissions("ycsl:ycslSj:view")
@RequestMapping(value = {"list", ""})
public String list(YcslSj ycslSj, HttpServletRequest request, HttpServletResponse response, Model model) {
if(StringUtils.isNotBlank(request.getParameter("WO"))) {
model.addAttribute("WO", request.getParameter("WO"));
}
if(StringUtils.isNotBlank(request.getParameter("proid"))) {
model.addAttribute("proid", request.getParameter("proid"));
}
if(StringUtils.isNotBlank(request.getParameter("view"))) {
model.addAttribute("view", request.getParameter("view"));
}
Page<YcslSj> page = ycslSjService.findPage(new Page<YcslSj>(request, response), ycslSj);
model.addAttribute("page", page);
return "modules/ycsl/ycslSjList";
}
@RequiresPermissions("ycsl:ycslSj:view")
@RequestMapping(value = "form")
public String form(YcslSj ycslSj, Model model, HttpServletRequest request) {
if(StringUtils.isNotBlank(request.getParameter("view"))) {
model.addAttribute("view", request.getParameter("view"));
}
model.addAttribute("proid", request.getParameter("proid"));
model.addAttribute("ycslSj", ycslSj);
return "modules/ycsl/ycslSjForm";
}
@RequiresPermissions("ycsl:ycslSj:edit")
@RequestMapping(value = "save")
public String save(YcslSj ycslSj, Model model, RedirectAttributes redirectAttributes) {
ycslSjService.saveSj(ycslSj);
addMessage(redirectAttributes, "保存一窗受理-收件材料成功");
return "redirect:"+Global.getAdminPath()+"/ycsl/ycslSj/list?proid="+ycslSj.getProid()+"&WO=1";
}
@RequiresPermissions("ycsl:ycslSj:edit")
@RequestMapping(value = "delete")
public String delete(YcslSj ycslSj, RedirectAttributes redirectAttributes) {
ycslSjService.delete(ycslSj);
addMessage(redirectAttributes, "删除一窗受理-收件材料成功");
return "redirect:"+Global.getAdminPath()+"/ycsl/ycslSj/list?proid="+ycslSj.getProid();
}
/***
* @Title: issjed
* @Description: 判断是否已经收件
* @param @param request
* @param @return 设定文件
* @return ModelMap 返回类型
* @throws
*/
@RequestMapping(value = "issjed")
@ResponseBody
public ModelMap issjed(HttpServletRequest request) {
String ywh = request.getParameter("proid");
YcslSj ycslSj = new YcslSj();
ycslSj.setProid(ywh);
List<YcslSj> findList = ycslSjService.findList(ycslSj);
ModelMap modelMap = new ModelMap();
if(findList.size()>0){
modelMap.put("data", "1");//已经有收件信息记录
}else{
modelMap.put("data", "0");
}
return modelMap;
}
}