public String projectSave() throws Exception {
    String id = (String) session.get(BaseAction.BASEIDINSESSION);
    EnterpriseBaseModel baseModel = eBaseService.get(id);

    String year;

    if (baseModel.getEnterpriseStyle() == EnterpriseBaseModel.EStyle.NONE.getValue()) {
      year = (String) application.get(Constants.OPTION_SDDECLARE_YEAR);
      year = Integer.parseInt(year) - 1 + "";
    } else year = (String) application.get(Constants.OPTION_NDDECLARE_YEAR);

    project.setDeclareYear(year);
    project.setBaseModel(baseModel);
    try {
      projectService.saveOrUpdate(project);
    } catch (ServiceException e) {
      LOGGER.error(e.getMessage());
    }
    return SUCCESS;
  }
Ejemplo n.º 2
0
  public String save() throws Exception {
    String list = servletRequest.getParameter("idList");
    String[] auditList = list.split(";");
    audit = new EnterpriseAudit();
    for (String id : auditList) {
      audit = auditService.get(id);
      audit.setAuditSecondStatus(state);

      if (state == 1) audit.setAuditSecondStatus(EnterpriseAudit.ESecondStatus.Pass.getValue());
      else if (state == 2)
        audit.setAuditSecondStatus(EnterpriseAudit.ESecondStatus.NotPass.getValue());
      // 退回市局
      else if (state == 4) {
        audit.setAuditStatusBackup(null);
        audit.setAuditSecondStatus(EnterpriseAudit.ESecondStatus.NotTj.getValue());
        audit.setAuditStatus(EnterpriseAudit.EStatus.Pass.getValue());
        // 退回企业
      } else if (state == 7) {
        audit.setAuditStatusBackup(null);
        audit.setAuditSecondStatus(EnterpriseAudit.ESecondStatus.Check.getValue());
        // audit.setAuditStatus(EnterpriseAudit.EStatus.Check.getValue());
        // 查阅完毕
      } else {
        audit.setAuditSecondStatus(EnterpriseAudit.ESecondStatus.NotTj.getValue());
        // audit.setAuditStatus(EnterpriseAudit.EStatus.NotAudite.getValue());
        // modified 4.25
        // 标记从科技厅退回
        audit.setAuditStatusBackup(1);
        rejectToEnt((String) application.get(Constants.OPTION_SDDECLARE_YEAR));
      }

      if (audit.getAuditType() == 1) { // 试点企业审核
        if (state == 1) { // 审核通过
          audit.getBaseModel().setEnterpriseStyle(EnterpriseBaseModel.EStyle.Example.getValue());
          audit
              .getBaseModel()
              .setEnterpriseExpeYear(audit.getDeclareYear()); // add EnterpriseExpeYear 11.1
        } else {
          audit.getBaseModel().setEnterpriseStyle(EnterpriseBaseModel.EStyle.NONE.getValue());
          audit.getBaseModel().setEnterpriseExpeYear(null);
          rejectService.expReject(
              audit.getBaseModel().getEnterpriseId(),
              (String) application.get(Constants.OPTION_SDDECLARE_YEAR));
        }
        // 不是 退回市局
        if (state != 4)
          audit.getBaseModel().setEnterpriseState(EnterpriseBaseModel.EStatus.NotApply.getValue());
      } else if (audit.getAuditType() == 2) { // 示范企业审核
        if (state == 1) { // 审核通过
          audit
              .getBaseModel()
              .setEnterpriseStyle(EnterpriseBaseModel.EStyle.demonstrate.getValue());
          audit
              .getBaseModel()
              .setEnterpriseDemoYear(audit.getDeclareYear()); // add EnterpriseExpeYear 11.1
        } else {
          audit.getBaseModel().setEnterpriseStyle(EnterpriseBaseModel.EStyle.NONE.getValue());
          audit.getBaseModel().setEnterpriseExpeYear(null);
        }
      } else if (audit.getAuditType() == 3) { // 年度审核
        // 不是 退回市局
        if (state != 4)
          audit.getBaseModel().setEnterpriseState(EnterpriseBaseModel.EStatus.NotApply.getValue());
        generateDemoAudit();
      }
      auditService.saveOrUpdate(audit);

      // 记录日志
      UserModel userModel = (UserModel) session.get("USER");
      eventService.saveSystemEvent(
          getMessageFromResource(
              "second.tijiao",
              new String[] {
                state == 1 ? getText("pass") : getText("notpass"),
                EnterpriseAudit.EStyle.values()[audit.getAuditType() - 1].getText(),
                audit.getAuditEnterprise()
              }),
          userModel);
    }
    return null;
  }