|
@@ -22,6 +22,7 @@ import com.jeeplus.common.utils.excel.ExportExcel;
|
|
import com.jeeplus.modules.sg.information.entity.Information;
|
|
import com.jeeplus.modules.sg.information.entity.Information;
|
|
import com.jeeplus.modules.sg.information.entity.InformationDto;
|
|
import com.jeeplus.modules.sg.information.entity.InformationDto;
|
|
import com.jeeplus.modules.sg.information.entity.append;
|
|
import com.jeeplus.modules.sg.information.entity.append;
|
|
|
|
+import com.jeeplus.modules.sg.information.entity.constant;
|
|
import com.jeeplus.modules.sg.information.service.InformationService;
|
|
import com.jeeplus.modules.sg.information.service.InformationService;
|
|
import com.jeeplus.modules.sg.information.utils.FreemarkerUtil;
|
|
import com.jeeplus.modules.sg.information.utils.FreemarkerUtil;
|
|
import com.jeeplus.modules.sg.information.utils.ImportInformation;
|
|
import com.jeeplus.modules.sg.information.utils.ImportInformation;
|
|
@@ -33,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;
|
|
@@ -50,6 +53,7 @@ import com.jeeplus.core.persistence.Page;
|
|
import com.jeeplus.core.web.BaseController;
|
|
import com.jeeplus.core.web.BaseController;
|
|
import com.jeeplus.common.utils.StringUtils;
|
|
import com.jeeplus.common.utils.StringUtils;
|
|
import com.jeeplus.common.utils.excel.ImportExcel;
|
|
import com.jeeplus.common.utils.excel.ImportExcel;
|
|
|
|
+import sun.tools.jconsole.JConsole;
|
|
|
|
|
|
import static org.quartz.jobs.FileScanJob.FILE_NAME;
|
|
import static org.quartz.jobs.FileScanJob.FILE_NAME;
|
|
|
|
|
|
@@ -82,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);
|
|
@@ -93,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();
|
|
@@ -103,19 +107,42 @@ 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);
|
|
return "modules/sg/information/informationForm";
|
|
return "modules/sg/information/informationForm";
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //配置超期时间节点页
|
|
|
|
+ @RequiresPermissions(value={"modules:sg:information:information:add","modules:sg:information:information:edit"},logical=Logical.OR)
|
|
|
|
+ @RequestMapping(value = "editOverTime")
|
|
|
|
+ public String constant(constant constant, Model model) {
|
|
|
|
+ String overTime = informationService.findOverTime("overTime");
|
|
|
|
+ constant.setOverTime(overTime);
|
|
|
|
+ model.addAttribute("constant", constant);
|
|
|
|
+ return "modules/sg/information/constantForm";
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //变更超期时间节点
|
|
|
|
+ @RequiresPermissions(value={"modules:sg:information:information:add","modules:sg:information:information:edit"},logical=Logical.OR)
|
|
|
|
+ @RequestMapping(value = "updateConstant")
|
|
|
|
+ @ResponseBody
|
|
|
|
+ public String updateConstant(constant constant) {
|
|
|
|
+ int count = informationService.updateConstant(constant);
|
|
|
|
+ if (count > 0 ) {
|
|
|
|
+ return "修改成功";
|
|
|
|
+ } else {
|
|
|
|
+ return "修改失败";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* 导入甲供物资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) {
|
|
@@ -145,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) {
|
|
@@ -169,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) {
|
|
@@ -192,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) {
|
|
@@ -245,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) {
|
|
@@ -285,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();
|
|
@@ -302,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();
|
|
@@ -325,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 = "";
|
|
@@ -407,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 = "";
|
|
@@ -489,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 = "";
|