|
@@ -58,7 +58,7 @@ public class ConstructionProjectController extends BaseController {
|
|
/**
|
|
/**
|
|
* 项目列表页面
|
|
* 项目列表页面
|
|
*/
|
|
*/
|
|
-// @RequiresPermissions("managementcenter:materialproject:list")
|
|
|
|
|
|
+ @RequiresPermissions("sg:managementCenter:constructionProject")
|
|
@RequestMapping(value = {"list", ""})
|
|
@RequestMapping(value = {"list", ""})
|
|
public String list(ConstructionProject constructionProject, Model model) {
|
|
public String list(ConstructionProject constructionProject, Model model) {
|
|
model.addAttribute("constructionProject", constructionProject);
|
|
model.addAttribute("constructionProject", constructionProject);
|
|
@@ -87,7 +87,7 @@ public class ConstructionProjectController extends BaseController {
|
|
/**
|
|
/**
|
|
* 查看,增加,编辑表单页面
|
|
* 查看,增加,编辑表单页面
|
|
*/
|
|
*/
|
|
-// @RequiresPermissions(value={"managementcenter:materialproject:view","managementcenter:materialproject:add","managementcenter:materialproject:edit"},logical=Logical.OR)
|
|
|
|
|
|
+// @RequiresPermissions(value={"managementcenter:materialproject:view")
|
|
@RequestMapping(value = "form")
|
|
@RequestMapping(value = "form")
|
|
public String form(ConstructionProject constructionProject, Model model) {
|
|
public String form(ConstructionProject constructionProject, Model model) {
|
|
model.addAttribute("constructionProject", constructionProject);
|
|
model.addAttribute("constructionProject", constructionProject);
|
|
@@ -117,7 +117,8 @@ public class ConstructionProjectController extends BaseController {
|
|
return "modules/sg/managementcenter/constructionProject/constructionForm";
|
|
return "modules/sg/managementcenter/constructionProject/constructionForm";
|
|
}
|
|
}
|
|
|
|
|
|
- //选择月分页面
|
|
|
|
|
|
+ //选择月份页面
|
|
|
|
+ @RequiresPermissions("sg:managementCenter:constructionProject:add")
|
|
@RequestMapping(value = "formDateMonth")
|
|
@RequestMapping(value = "formDateMonth")
|
|
public String formDateMonth(ConstructionProjectTemporary constructionProject,Model model){
|
|
public String formDateMonth(ConstructionProjectTemporary constructionProject,Model model){
|
|
return "modules/sg/managementcenter/constructionProject/constructionDateForm";
|
|
return "modules/sg/managementcenter/constructionProject/constructionDateForm";
|
|
@@ -126,7 +127,6 @@ public class ConstructionProjectController extends BaseController {
|
|
* 保存
|
|
* 保存
|
|
*/
|
|
*/
|
|
@ResponseBody
|
|
@ResponseBody
|
|
-// @RequiresPermissions(value={"managementcenter:materialproject:add","managementcenter:materialproject:edit"},logical=Logical.OR)
|
|
|
|
@RequestMapping(value = "save")
|
|
@RequestMapping(value = "save")
|
|
public AjaxJson save(ConstructionProject constructionProject, Model model) throws Exception{
|
|
public AjaxJson save(ConstructionProject constructionProject, Model model) throws Exception{
|
|
AjaxJson j = new AjaxJson();
|
|
AjaxJson j = new AjaxJson();
|
|
@@ -189,7 +189,7 @@ public class ConstructionProjectController extends BaseController {
|
|
* 批量删除
|
|
* 批量删除
|
|
*/
|
|
*/
|
|
@ResponseBody
|
|
@ResponseBody
|
|
- @RequiresPermissions("managementcenter:materialproject:del")
|
|
|
|
|
|
+ @RequiresPermissions("sg:managementCenter:constructionProject:del")
|
|
@RequestMapping(value = "deleteAll")
|
|
@RequestMapping(value = "deleteAll")
|
|
public AjaxJson deleteAll(String ids) {
|
|
public AjaxJson deleteAll(String ids) {
|
|
AjaxJson j = new AjaxJson();
|
|
AjaxJson j = new AjaxJson();
|
|
@@ -258,18 +258,22 @@ public class ConstructionProjectController extends BaseController {
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
|
|
- /**
|
|
|
|
- * 计划安排时间修改
|
|
|
|
- * @param constructionProject
|
|
|
|
- * @return
|
|
|
|
- */
|
|
|
|
- @ResponseBody
|
|
|
|
- @RequestMapping(value = "unplannedPlan")
|
|
|
|
- public AjaxJson getUnplannedPlan(ConstructionProject constructionProject,Date historyTime){
|
|
|
|
- AjaxJson j = new AjaxJson();
|
|
|
|
- constructionProject.setProjectStatus("1");
|
|
|
|
- constructionProjectService.updateSpecificTime(constructionProject,historyTime);
|
|
|
|
- j.setMsg("设置时间成功");
|
|
|
|
- return j;
|
|
|
|
- }
|
|
|
|
|
|
+ @ResponseBody
|
|
|
|
+ @RequestMapping(value = "monthTime")
|
|
|
|
+ public AjaxJson monthTimeController(ConstructionProject constructionProject){
|
|
|
|
+ AjaxJson ajaxJson = new AjaxJson();
|
|
|
|
+ try {
|
|
|
|
+ List<ConstructionProject> list = constructionProjectService.findList(constructionProject);
|
|
|
|
+ if (list.size()>0){
|
|
|
|
+ ajaxJson.setSuccess(false);
|
|
|
|
+ ajaxJson.setMsg("该日期已经存在项目");
|
|
|
|
+ return ajaxJson;
|
|
|
|
+ }
|
|
|
|
+ }catch (Exception e){
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ ajaxJson.setSuccess(true);
|
|
|
|
+ ajaxJson.setMsg("操作成功");
|
|
|
|
+ return ajaxJson;
|
|
|
|
+ }
|
|
}
|
|
}
|