|
@@ -584,7 +584,7 @@ public class ProjectPlanArrageController extends BaseController {
|
|
|
Result ajaxJson = new Result();
|
|
|
try {
|
|
|
//获取ids的集合
|
|
|
- String comment ="[退回项目]:"+URLDecoder.decode(backToText, "UTF-8");
|
|
|
+ String comment = URLDecoder.decode(backToText, "UTF-8");
|
|
|
List<String> strings = PackagingUtil.getString(ids);
|
|
|
//获取安排的项目
|
|
|
List<ProjectPlanArrage> projectPlans = (List<ProjectPlanArrage>)request.getSession().getAttribute("summaryList");
|
|
@@ -607,7 +607,51 @@ public class ProjectPlanArrageController extends BaseController {
|
|
|
List<Map<String, Object>> bookStrapTree = BookStrapTreeUtil.getAllBookStrapTree(objects, planArrages,"2");
|
|
|
ajaxJson.setMapListTree(bookStrapTree);
|
|
|
ajaxJson.setSuccess(true);
|
|
|
- ajaxJson.setMessage("删除成功");
|
|
|
+ ajaxJson.setMessage("备注成功");
|
|
|
+ return ajaxJson;
|
|
|
+ }catch (Exception e){
|
|
|
+ ajaxJson.setSuccess(false);
|
|
|
+ ajaxJson.setMessage("备注失败!");
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return ajaxJson;
|
|
|
+ }
|
|
|
+
|
|
|
+ //页面(constructionManageAct.jsp)删除项目 -- 填写备注--施工单位项目经理 -- 填写完成后由配网项目经理同意删除
|
|
|
+ @ResponseBody
|
|
|
+ @RequestMapping(value = "deletePlanArrangeAll")
|
|
|
+ public Result deletePlanArrangeAll(String ids,HttpServletRequest request){
|
|
|
+ Result ajaxJson = new Result();
|
|
|
+ try {
|
|
|
+ //获取ids的集合
|
|
|
+ List<String> strings = PackagingUtil.getString(ids);
|
|
|
+ //获取安排的项目
|
|
|
+ List<ProjectPlanArrage> projectPlans = (List<ProjectPlanArrage>)request.getSession().getAttribute("summaryList");
|
|
|
+ //验证是否允许
|
|
|
+ boolean flag = projectPlanArrageService.deleteJudgePlanArrange(projectPlans, strings);
|
|
|
+ if (!flag){
|
|
|
+ ajaxJson.setSuccess(false);
|
|
|
+ ajaxJson.setMessage("只允许删除本人的项目()!");
|
|
|
+ return ajaxJson;
|
|
|
+ }
|
|
|
+ //删除项目
|
|
|
+ boolean b = projectPlanArrageService.deletePlanArrangeAll(projectPlans, strings);
|
|
|
+ List<Map<String,Object>> objects = Lists.newArrayList();
|
|
|
+ List<ProjectPlanArrage> planArrages = new ArrayList<ProjectPlanArrage>();
|
|
|
+ for (ProjectPlanArrage planArrage:projectPlans){
|
|
|
+ if (planArrage.getArrageFlag().equals("0")){
|
|
|
+ planArrages.add(planArrage);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<Map<String, Object>> bookStrapTree = BookStrapTreeUtil.getAllBookStrapTree(objects, planArrages,"2");
|
|
|
+ ajaxJson.setMapListTree(bookStrapTree);
|
|
|
+ if (b){
|
|
|
+ ajaxJson.setSuccess(true);
|
|
|
+ ajaxJson.setMessage("删除成功");
|
|
|
+ }else {
|
|
|
+ ajaxJson.setSuccess(false);
|
|
|
+ ajaxJson.setMessage("请选择本人增加的项目进行删除,如不是,删除请备注(列表文字颜色区分)!");
|
|
|
+ }
|
|
|
return ajaxJson;
|
|
|
}catch (Exception e){
|
|
|
ajaxJson.setSuccess(false);
|