示例#1
0
 /**
  * 工单执行(完成任务)
  *
  * @param testAudit
  * @param model
  * @return
  */
 @RequiresPermissions("oa:testAudit:edit")
 @RequestMapping(value = "saveAudit")
 public String saveAudit(TestAudit testAudit, Model model) {
   if (StringUtils.isBlank(testAudit.getAct().getFlag())
       || StringUtils.isBlank(testAudit.getAct().getComment())) {
     addMessage(model, "请填写审核意见。");
     return form(testAudit, model);
   }
   testAuditService.auditSave(testAudit);
   return "redirect:" + adminPath + "/act/task/todo/";
 }
示例#2
0
  /**
   * 申请单填写
   *
   * @param testAudit
   * @param model
   * @return
   */
  @RequiresPermissions("oa:testAudit:view")
  @RequestMapping(value = "form")
  public String form(TestAudit testAudit, Model model) {

    String view = "testAuditForm";

    // 查看审批申请单
    if (StringUtils.isNotBlank(testAudit.getId())) { // .getAct().getProcInsId())){

      // 环节编号
      String taskDefKey = testAudit.getAct().getTaskDefKey();

      // 查看工单
      if (testAudit.getAct().isFinishTask()) {
        view = "testAuditView";
      }
      // 修改环节
      else if ("modify".equals(taskDefKey)) {
        view = "testAuditForm";
      }
      // 审核环节
      else if ("audit".equals(taskDefKey)) {
        view = "testAuditAudit";
        //				String formKey = "/oa/testAudit";
        //				return "redirect:" + ActUtils.getFormUrl(formKey, testAudit.getAct());
      }
      // 审核环节2
      else if ("audit2".equals(taskDefKey)) {
        view = "testAuditAudit";
      }
      // 审核环节3
      else if ("audit3".equals(taskDefKey)) {
        view = "testAuditAudit";
      }
      // 审核环节4
      else if ("audit4".equals(taskDefKey)) {
        view = "testAuditAudit";
      }
      // 兑现环节
      else if ("apply_end".equals(taskDefKey)) {
        view = "testAuditAudit";
      }
    }

    model.addAttribute("testAudit", testAudit);
    return "modules/oa/" + view;
  }
示例#3
0
 /**
  * 申请单保存/修改
  *
  * @param testAudit
  * @param model
  * @param redirectAttributes
  * @return
  */
 @RequiresPermissions("oa:testAudit:edit")
 @RequestMapping(value = "save")
 public String save(TestAudit testAudit, Model model, RedirectAttributes redirectAttributes) {
   if (!beanValidator(model, testAudit)) {
     return form(testAudit, model);
   }
   testAuditService.save(testAudit);
   addMessage(redirectAttributes, "提交审批'" + testAudit.getUser().getName() + "'成功");
   return "redirect:" + adminPath + "/act/task/todo/";
 }
示例#4
0
 @RequiresPermissions("oa:testAudit:view")
 @RequestMapping(value = {"list", ""})
 public String list(
     TestAudit testAudit, HttpServletRequest request, HttpServletResponse response, Model model) {
   User user = UserUtils.getUser();
   if (!user.isAdmin()) {
     testAudit.setCreateBy(user);
   }
   Page<TestAudit> page =
       testAuditService.findPage(new Page<TestAudit>(request, response), testAudit);
   model.addAttribute("page", page);
   return "modules/oa/testAuditList";
 }