|
@@ -34,6 +34,8 @@ import freemarker.template.Template;
|
|
import io.swagger.models.auth.In;
|
|
import io.swagger.models.auth.In;
|
|
import net.sf.ehcache.util.concurrent.ConcurrentHashMap;
|
|
import net.sf.ehcache.util.concurrent.ConcurrentHashMap;
|
|
import org.apache.poi.ss.usermodel.Row;
|
|
import org.apache.poi.ss.usermodel.Row;
|
|
|
|
+import org.apache.shiro.authz.annotation.Logical;
|
|
|
|
+import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
import org.apache.shiro.session.Session;
|
|
import org.apache.shiro.session.Session;
|
|
import org.h2.util.New;
|
|
import org.h2.util.New;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -84,7 +86,7 @@ public class InformationController extends BaseController {
|
|
/**
|
|
/**
|
|
* 项目管理列表页
|
|
* 项目管理列表页
|
|
*/
|
|
*/
|
|
- //@RequiresPermissions("test:information:information:list")
|
|
|
|
|
|
+ @RequiresPermissions("modules:sg:information:information:list")
|
|
@RequestMapping(value = {"list", ""})
|
|
@RequestMapping(value = {"list", ""})
|
|
public String list(Information information, Model model) {
|
|
public String list(Information information, Model model) {
|
|
model.addAttribute("informationList", information);
|
|
model.addAttribute("informationList", information);
|
|
@@ -95,7 +97,7 @@ public class InformationController extends BaseController {
|
|
* 项目管理列表数据
|
|
* 项目管理列表数据
|
|
*/
|
|
*/
|
|
@ResponseBody
|
|
@ResponseBody
|
|
- //@RequiresPermissions("test:onetomany:dialog:testDataMain1:list")
|
|
|
|
|
|
+ @RequiresPermissions("modules:sg:information:information:list")
|
|
@RequestMapping(value = "data")
|
|
@RequestMapping(value = "data")
|
|
public Map<String, Object> data(Information information, HttpServletRequest request, HttpServletResponse response, Model model) {
|
|
public Map<String, Object> data(Information information, HttpServletRequest request, HttpServletResponse response, Model model) {
|
|
HttpSession session = request.getSession();
|
|
HttpSession session = request.getSession();
|
|
@@ -105,6 +107,7 @@ public class InformationController extends BaseController {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ @RequiresPermissions(value={"modules:sg:information:information:view","modules:sg:information:information:add","modules:sg:information:information:edit"},logical= Logical.OR)
|
|
@RequestMapping(value = "form")
|
|
@RequestMapping(value = "form")
|
|
public String form(Information information, Model model) {
|
|
public String form(Information information, Model model) {
|
|
model.addAttribute("Information", information);
|
|
model.addAttribute("Information", information);
|
|
@@ -112,6 +115,7 @@ public class InformationController extends BaseController {
|
|
}
|
|
}
|
|
|
|
|
|
//配置超期时间节点页
|
|
//配置超期时间节点页
|
|
|
|
+ @RequiresPermissions(value={"modules:sg:information:information:add","modules:sg:information:information:edit"},logical=Logical.OR)
|
|
@RequestMapping(value = "editOverTime")
|
|
@RequestMapping(value = "editOverTime")
|
|
public String constant(constant constant, Model model) {
|
|
public String constant(constant constant, Model model) {
|
|
String overTime = informationService.findOverTime("overTime");
|
|
String overTime = informationService.findOverTime("overTime");
|
|
@@ -121,11 +125,12 @@ public class InformationController extends BaseController {
|
|
}
|
|
}
|
|
|
|
|
|
//变更超期时间节点
|
|
//变更超期时间节点
|
|
|
|
+ @RequiresPermissions(value={"modules:sg:information:information:add","modules:sg:information:information:edit"},logical=Logical.OR)
|
|
@RequestMapping(value = "updateConstant")
|
|
@RequestMapping(value = "updateConstant")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public String updateConstant(constant constant) {
|
|
public String updateConstant(constant constant) {
|
|
- int s = informationService.updateConstant(constant);
|
|
|
|
- if (s > 0 ) {
|
|
|
|
|
|
+ int count = informationService.updateConstant(constant);
|
|
|
|
+ if (count > 0 ) {
|
|
return "修改成功";
|
|
return "修改成功";
|
|
} else {
|
|
} else {
|
|
return "修改失败";
|
|
return "修改失败";
|
|
@@ -137,7 +142,7 @@ public class InformationController extends BaseController {
|
|
/**
|
|
/**
|
|
* 导入甲供物资Excel数据
|
|
* 导入甲供物资Excel数据
|
|
*/
|
|
*/
|
|
- //@RequiresPermissions("test:onetomany:dialog:information:import")
|
|
|
|
|
|
+ @RequiresPermissions("modules:sg:information:information:import")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
@RequestMapping(value = "import")
|
|
@RequestMapping(value = "import")
|
|
public AjaxJson importFile(@RequestParam("file")MultipartFile file, HttpServletResponse response, HttpServletRequest request) {
|
|
public AjaxJson importFile(@RequestParam("file")MultipartFile file, HttpServletResponse response, HttpServletRequest request) {
|
|
@@ -167,6 +172,7 @@ public class InformationController extends BaseController {
|
|
/**
|
|
/**
|
|
* 导入综合信息Excel数据
|
|
* 导入综合信息Excel数据
|
|
* */
|
|
* */
|
|
|
|
+ @RequiresPermissions("modules:sg:information:information:import")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
@RequestMapping(value = "importCom")
|
|
@RequestMapping(value = "importCom")
|
|
public AjaxJson importFileCom(@RequestParam("file")MultipartFile file, HttpServletResponse response, HttpServletRequest request) {
|
|
public AjaxJson importFileCom(@RequestParam("file")MultipartFile file, HttpServletResponse response, HttpServletRequest request) {
|
|
@@ -191,7 +197,7 @@ public class InformationController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
+ @RequiresPermissions("modules:sg:information:information:import")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
@RequestMapping(value = "importInTrial")
|
|
@RequestMapping(value = "importInTrial")
|
|
public AjaxJson importInTrial(@RequestParam("file")MultipartFile file, HttpServletResponse response, HttpServletRequest request) {
|
|
public AjaxJson importInTrial(@RequestParam("file")MultipartFile file, HttpServletResponse response, HttpServletRequest request) {
|
|
@@ -214,7 +220,7 @@ public class InformationController extends BaseController {
|
|
return j;
|
|
return j;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
+ @RequiresPermissions("modules:sg:information:information:import")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
@RequestMapping(value = "btnSearch")
|
|
@RequestMapping(value = "btnSearch")
|
|
public Map<String, Object> btnSearch(@RequestParam("file")MultipartFile file, Information information, HttpServletRequest request, HttpServletResponse response, Model model) {
|
|
public Map<String, Object> btnSearch(@RequestParam("file")MultipartFile file, Information information, HttpServletRequest request, HttpServletResponse response, Model model) {
|
|
@@ -267,6 +273,7 @@ public class InformationController extends BaseController {
|
|
}
|
|
}
|
|
|
|
|
|
//导入原因类型
|
|
//导入原因类型
|
|
|
|
+ @RequiresPermissions("modules:sg:information:information:import")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
@RequestMapping(value = "btnInReason")
|
|
@RequestMapping(value = "btnInReason")
|
|
public AjaxJson btnInReason(@RequestParam("file")MultipartFile file, Information information, HttpServletRequest request, HttpServletResponse response, Model model) {
|
|
public AjaxJson btnInReason(@RequestParam("file")MultipartFile file, Information information, HttpServletRequest request, HttpServletResponse response, Model model) {
|
|
@@ -307,7 +314,7 @@ public class InformationController extends BaseController {
|
|
* 批量导入模板
|
|
* 批量导入模板
|
|
* */
|
|
* */
|
|
@ResponseBody
|
|
@ResponseBody
|
|
-// @RequiresPermissions("test:onetomany:form:testDataMain2:import")
|
|
|
|
|
|
+ @RequiresPermissions("modules:sg:information:information:export")
|
|
@RequestMapping(value = "import/template")
|
|
@RequestMapping(value = "import/template")
|
|
public AjaxJson importFileTemplate(HttpServletResponse response) {
|
|
public AjaxJson importFileTemplate(HttpServletResponse response) {
|
|
AjaxJson j = new AjaxJson();
|
|
AjaxJson j = new AjaxJson();
|
|
@@ -324,8 +331,11 @@ public class InformationController extends BaseController {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 导入送审模板下载
|
|
|
|
+ * */
|
|
@ResponseBody
|
|
@ResponseBody
|
|
-// @RequiresPermissions("test:onetomany:form:testDataMain2:import")
|
|
|
|
|
|
+ @RequiresPermissions("modules:sg:information:information:export")
|
|
@RequestMapping(value = "import/templates")
|
|
@RequestMapping(value = "import/templates")
|
|
public AjaxJson importFileTemplateS(HttpServletResponse response) {
|
|
public AjaxJson importFileTemplateS(HttpServletResponse response) {
|
|
AjaxJson j = new AjaxJson();
|
|
AjaxJson j = new AjaxJson();
|
|
@@ -347,7 +357,7 @@ public class InformationController extends BaseController {
|
|
|
|
|
|
public static Map<String, ExportExcel> excelParamCache = new ConcurrentHashMap<>();
|
|
public static Map<String, ExportExcel> excelParamCache = new ConcurrentHashMap<>();
|
|
@ResponseBody
|
|
@ResponseBody
|
|
- //@RequiresPermissions("test:onetomany:dialog:testDataMain1:export")
|
|
|
|
|
|
+ @RequiresPermissions("modules:sg:information:information:export")
|
|
@RequestMapping(value = "exportMaterial")
|
|
@RequestMapping(value = "exportMaterial")
|
|
public AjaxJson exportMaterial(Information information,HttpServletRequest request, HttpServletResponse response) {
|
|
public AjaxJson exportMaterial(Information information,HttpServletRequest request, HttpServletResponse response) {
|
|
String projectId = "";
|
|
String projectId = "";
|
|
@@ -429,7 +439,7 @@ public class InformationController extends BaseController {
|
|
|
|
|
|
|
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
- //@RequiresPermissions("test:onetomany:dialog:testDataMain1:export")
|
|
|
|
|
|
+ @RequiresPermissions("modules:sg:information:information:export")
|
|
@RequestMapping(value = "export")
|
|
@RequestMapping(value = "export")
|
|
public AjaxJson export(Information information,HttpServletRequest request, HttpServletResponse response) {
|
|
public AjaxJson export(Information information,HttpServletRequest request, HttpServletResponse response) {
|
|
String projectId = "";
|
|
String projectId = "";
|
|
@@ -511,7 +521,7 @@ public class InformationController extends BaseController {
|
|
|
|
|
|
//导出word
|
|
//导出word
|
|
@ResponseBody
|
|
@ResponseBody
|
|
- //@RequiresPermissions("test:onetomany:dialog:testDataMain1:export")
|
|
|
|
|
|
+ @RequiresPermissions("modules:sg:information:information:export")
|
|
@RequestMapping(value = "exportInformation")
|
|
@RequestMapping(value = "exportInformation")
|
|
public void exportInformation(Information information,HttpServletRequest request, HttpServletResponse response) {
|
|
public void exportInformation(Information information,HttpServletRequest request, HttpServletResponse response) {
|
|
String projectId = "";
|
|
String projectId = "";
|