|
@@ -392,6 +392,43 @@ public class ProjectFilingBatchController extends BaseController {
|
|
|
}
|
|
|
return "redirect:" + Global.getAdminPath() + "/projectFilingBatch/projectFilingBatchInfo/?repage";
|
|
|
}
|
|
|
+ /**
|
|
|
+ * 暂存归档批次项目
|
|
|
+ */
|
|
|
+ @RequiresPermissions(value = {"projectFilingBatch:projectFilingBatchInfo:add"}, logical = Logical.OR)
|
|
|
+ @RequestMapping(value = "holdSave")
|
|
|
+ public String holdSave(ProjectFilingBatch projectFilingBatch, Model model, RedirectAttributes redirectAttributes, @RequestParam("proId")String[] proId, String[] proInfos,String[] flags) throws Exception {
|
|
|
+ if (!beanValidator(model, projectFilingBatch)){
|
|
|
+ return form(projectFilingBatch, model);
|
|
|
+ }
|
|
|
+ try{
|
|
|
+ if (projectFilingBatch.getId()!=null && StringUtils.isNotBlank(projectFilingBatch.getId())) {//编辑表单保存
|
|
|
+ ProjectFilingBatch t = projectFilingBatchService.get(projectFilingBatch.getId());//从数据库取出记录的值
|
|
|
+ MyBeanUtils.copyBeanNotNull2Bean(projectFilingBatch, t);
|
|
|
+ projectFilingBatch.setFilingStatus(1);
|
|
|
+ projectFilingBatchService.saveProject(proId,projectFilingBatch, ProjectStatusEnum.TSTORE,proInfos,flags);//保存
|
|
|
+ if(t.getFilingStatus() == 2){
|
|
|
+ addMessage(redirectAttributes, "归档批次已送审,无法暂存");
|
|
|
+ return "redirect:"+Global.getAdminPath()+"/projectFilingBatch/projectFilingBatchInfo/?repage";
|
|
|
+ }else if(t.getFilingStatus() == 5){
|
|
|
+ addMessage(redirectAttributes, "项目归档批次已归档,无法暂存");
|
|
|
+ return "redirect:"+Global.getAdminPath()+"/projectFilingBatch/projectFilingBatchInfo/?repage";
|
|
|
+ }
|
|
|
+ } else {//新增表单保存
|
|
|
+ projectFilingBatch.setFilingStatus(1);
|
|
|
+ projectFilingBatchService.saveProject(proId,projectFilingBatch, ProjectStatusEnum.TSTORE,proInfos,flags);//保存
|
|
|
+// //新增项目树形信息
|
|
|
+// if (proInfos.length!=0) {
|
|
|
+// projectFilingBatchService.insertProInfo(proInfos, flags, proId,projectFilingBatch.getId());
|
|
|
+// }
|
|
|
+ }
|
|
|
+ addMessage(redirectAttributes, "归档暂存成功");
|
|
|
+ }catch (Exception e){
|
|
|
+ logger.error("送审项目异常",e);
|
|
|
+ addMessage(redirectAttributes, "归档暂存异常:"+e.getMessage());
|
|
|
+ }
|
|
|
+ return "redirect:" + Global.getAdminPath() + "/projectFilingBatch/projectFilingBatchInfo/?repage";
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 撤回
|