74a1d524b4c0164a4b92d6f443a8e2fba5f98d14.svn-base
3.2 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
/**
* Copyright © 2015-2018 ODM All rights reserved.
*/
package com.thinkgem.jeesite.modules.sys.web;
import java.util.Map;
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.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import com.google.common.collect.Maps;
import com.thinkgem.jeesite.common.config.Global;
import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.utils.StringUtils;
import com.thinkgem.jeesite.common.web.BaseController;
import com.thinkgem.jeesite.modules.reg.entity.base.RegBasePerson;
import com.thinkgem.jeesite.modules.reg.service.bus.RegBusFdcq2Service;
import com.thinkgem.jeesite.modules.sys.entity.RegBusInterHis;
import com.thinkgem.jeesite.modules.sys.po.JudgeDto;
import com.thinkgem.jeesite.modules.sys.service.InterSiService;
/**
* 登0录Controller
*
* @author ThinkGem
* @version 2013-5-31
*/
@Controller
public class InterSiController extends BaseController {
@Autowired
private InterSiService siService;
/**
* 管理登录
*/
@RequestMapping(value = "${adminPath}/InterSi/{si_type}/{si_code}", method = RequestMethod.POST)
public void si_post(HttpServletRequest request,@PathVariable String si_code,@PathVariable String si_type, HttpServletResponse response, Model model) {
Map resmap = Maps.newHashMap();
try{
String data = request.getParameter("data");
String interdata = request.getParameter("interdata");
resmap = siService.si_post(data, interdata,si_type+"/"+si_code);
resmap.put("success", "0");
}catch(Exception e){
e.printStackTrace();
resmap.put("success", "1");
resmap.put("error_msg", e.getMessage());
}
renderString(response, resmap);
}
@RequiresPermissions("reg:base:regBasePerson:view")
@RequestMapping(value = {"${adminPath}/InterSi/list"})
public String list(RegBusInterHis regBusInterHis, HttpServletRequest request, HttpServletResponse response, Model model) {
System.out.println(regBusInterHis.getPcode()+"****");
Page<RegBusInterHis> page = siService.findPage(new Page<RegBusInterHis>(request, response), regBusInterHis);
model.addAttribute("page", page);
model.addAttribute("regBusInterHis", regBusInterHis);
model.addAttribute("pcode", regBusInterHis.getPcode());
return "modules/sys/interHisList";
}
/**
* 司法裁决
*/
@RequestMapping(value = "${adminPath}/{si_type}/judge", method = RequestMethod.POST)
public void si_judge(HttpServletRequest request,@PathVariable String si_type, HttpServletResponse response, Model model,JudgeDto dto) {
Map resmap = Maps.newHashMap();
try{
String data = request.getParameter("data");
resmap = siService.ju_post(dto,si_type+"/judge");
resmap.put("success", "0");
}catch(Exception e){
e.printStackTrace();
resmap.put("success", "1");
resmap.put("error_msg", e.getMessage());
}
renderString(response, resmap);
}
}