/** 审核未通过事件 */
  protected void reviewNoBtn_OnSubmit() {

    if (StringUtils.isEmpty(reviewDescription.getValue())) {
      alertError(MessageUtils.getMessage("ERR0013", "审核未通过时,请在备注中输入未通过的原因"));
      return;
    }

    PlatformProductsReviewDto reviewDto = new PlatformProductsReviewDto();
    reviewDto.setPlatformProductsId(
        ConvUtils.convToString(
            getPageParameters().get(PageParamConstant.OID_PLATFORM_PRODUCTS_ID)));
    reviewDto.setReviewType("02");
    reviewDto.setReviewFlg("2");
    reviewDto.setReviewDate(DateUtils.getDate());
    reviewDto.setReviewRemark(reviewDescription.getValue());
    reviewDto.setReviewUserId(getAdminUser().getOidAdminUserId());
    reviewDto.setUpdUserIid(getAdminUser().getOidAdminUserId());

    boolean flg = fundService.review(reviewDto);
    if (!flg) {
      alertError(MessageUtils.getMessage("ERR0013", "请重新审核或与系统管理员联系。"));
    } else {
      removeLockReview();
      alertSucc(3);
    }
  }
 private boolean checkInput() {
   if (StringUtils.isEmpty(advertizeShowPageChoice.getValue())) {
     alertError(MessageUtils.getMessage("ERR0001", "广告显示页面"));
     return false;
   } else if (StringUtils.isEmpty(showType.getValue())) {
     alertError(MessageUtils.getMessage("ERR0001", "广告类型"));
     return false;
   } else if (StringUtils.isEmpty(sort.getValue())) {
     alertError(MessageUtils.getMessage("ERR0001", "排序"));
     return false;
   } else if (StringUtils.isEmpty(validFlg.getValue())) {
     alertError(MessageUtils.getMessage("ERR0001", "有效"));
     return false;
   } else if (opType.equals("I") && upLinksIcon.getFileUploads().size() == 0) {
     alertError(MessageUtils.getMessage("ERR0017", "图片"));
     return false;
   } else if (opType.equals("I") && upLinksBakIcon.getFileUploads().size() == 0) {
     alertError(MessageUtils.getMessage("ERR0017", "背景图片"));
     return false;
   } else if (StringUtils.isEmpty(linkUrl.getValue())) {
     alertError(MessageUtils.getMessage("ERR0001", "公司网址"));
     return false;
   } else if (!StringUtils.isUrl(linkUrl.getValue())) {
     alertError(MessageUtils.getMessage("ERR0019", "公司网址"));
     return false;
   }
   clearAlert();
   return true;
 }
 public void initPage() {
   createList();
   cnt.setValue(String.valueOf(userDP.getCount()));
   if (userDP.getCount() < 1) {
     alertInfo(MessageUtils.getMessage("INF0003", "个人用户"));
     paging.setVisible(false);
   } else {
     clearAlert();
     paging.setVisible(true);
   }
 }
 /** 审核锁定解除事件 */
 protected void removeLockLink_OnSubmit() {
   boolean removeFlg = removeLockReview();
   if (!removeFlg) {
     alertError(MessageUtils.getMessage("ERR0013", "请重新解除审核锁定或与系统管理员联系。"));
   } else {
     reviewYesBtn.setVisible(false);
     reviewNoBtn.setVisible(false);
     removeLockLink.setVisible(false);
     alertSucc(1);
   }
 }
 /**
  * 初始化画面。
  *
  * @param 没有
  * @return 没有
  */
 @Override
 public void initPage() {
   rptList.setCurrentPage(0);
   createList();
   cnt.setValue(String.valueOf(adminDP.getCount()));
   if (adminDP.getCount() < 1) {
     alertInfo(MessageUtils.getMessage("INF0003", "投资信息"));
     paging.setVisible(false);
   } else {
     clearAlert();
     paging.setVisible(true);
   }
   setInitComponentValue();
 }
 @Override
 public void initPage() {
   wmId = FWUrlUtil.decode(getParameter("WM_ID"));
   wmName = FWUrlUtil.decode(getParameter("WM_NAME"));
   wealthManager.setValue(wmName);
   createList();
   cnt.setValue(String.valueOf(customerDP.getCount()));
   if (customerDP.getCount() < 1) {
     alertInfo(MessageUtils.getMessage("INF0003", "客户"));
     paging.setVisible(false);
   } else {
     clearAlert();
     paging.setVisible(true);
   }
 }
  protected void form_OnSubmit() {
    if (!checkInput()) {
      return;
    }
    // 业务鉴证
    AdvertizeDto dto = new AdvertizeDto();
    dto.setId(id);
    Map<String, Object> advertizeMap = operationsManageService.getAdvertizeById(dto);
    if (opType.equals("U") && advertizeMap.isEmpty()) {
      alertError(MessageUtils.getMessage("ERR0013", "数据已被删除。"));
      submitBtn.setDisabled(true);
      return;
    }

    // 文件上传
    String linksImgPath = "";
    String linksBakImgPath = "";
    try {
      if (upLinksIcon.getFileUploads().size() > 0) {
        linksImgPath =
            imageDataStoreManager.put(upLinksIcon.getFileName(), upLinksIcon.getInputStream());
      }
      if (upLinksBakIcon.getFileUploads().size() > 0) {
        linksBakImgPath =
            imageDataStoreManager.put(
                upLinksBakIcon.getFileName(), upLinksBakIcon.getInputStream());
      }
    } catch (FWImageDataStoreException e) {
      if (e.getErrorCode().equals("FW004005E")) {
        alertError(e.getMessage());
      } else {
        logger.error("图片上传失败。", e);
        if ("U".equals(opType)) {
          saveOperatorLog(
              Constants.OPERATOR_LOG_U, Constants.OPERATOR_LOG_FAILURE, "广告【" + id + "】编辑失败。");
        } else {
          saveOperatorLog(Constants.OPERATOR_LOG_I, Constants.OPERATOR_LOG_FAILURE, "广告添加失败。");
        }
        alertError(MessageUtils.getMessage("ERR0013", "图片上传失败。"));
      }
      return;
    }
    // 数据登陆
    dto.setAdvertizeShowPageId(advertizeShowPageChoice.getValue());
    dto.setShowType(showType.getValue());
    dto.setSort(sort.getValue());
    dto.setValidFlg(validFlg.getValue());
    dto.setImgPath(linksImgPath);
    dto.setBackgroundImgPath(linksBakImgPath);
    if (linkUrl.getValue().startsWith("http://")) {
      dto.setLinkUrl(linkUrl.getValue());
    } else {
      dto.setLinkUrl("http://" + linkUrl.getValue());
    }
    dto.setUpdUserId(getAdminUser().getOidAdminUserId());
    if (opType.equals("U")) {
      dto.setId(id);
      boolean upd = operationsManageService.updAdvertize(dto);
      if (upd) {
        try {
          if (!StringUtils.isEmpty(linksImgPath)) {
            imageDataStoreManager.delete(ConvUtils.convToString(advertizeMap.get("IMG_PATH")));
            linksIcon.setSrc(imageDataStoreManager.getURL(linksImgPath).replace("\\", "/"));
          }
          if (!StringUtils.isEmpty(linksBakImgPath)) {
            imageDataStoreManager.delete(
                ConvUtils.convToString(advertizeMap.get("BACKGROUND_IMG_PATH")));
            linksBakIcon.setSrc(imageDataStoreManager.getURL(linksBakImgPath).replace("\\", "/"));
          }
        } catch (FWImageDataStoreException e) {
          logger.error("图片删除失败。", e);
        }
        saveOperatorLog(
            Constants.OPERATOR_LOG_U,
            Constants.OPERATOR_LOG_SUCCESS,
            "广告【" + dto.getId() + "】更新成功。");

        submitBtn.setDisabled(true);
        alertSucc(2);
      } else {
        saveOperatorLog(
            Constants.OPERATOR_LOG_U,
            Constants.OPERATOR_LOG_FAILURE,
            "广告【" + dto.getId() + "】更新失败。");
        alertError(MessageUtils.getMessage("ERR0013", "数据可能已被删除。"));
      }
    } else {
      boolean add = operationsManageService.insAdvertize(dto);
      if (add) {
        saveOperatorLog(
            Constants.OPERATOR_LOG_I,
            Constants.OPERATOR_LOG_SUCCESS,
            "广告【"
                + advertizeShowPageChoice.getValue()
                + ','
                + showType.getValue()
                + ','
                + sort.getValue()
                + "】添加成功。");
        linksIcon.setVisible(true);
        linksIcon.setSrc(imageDataStoreManager.getURL(linksImgPath).replace("\\", "/"));
        linksBakIcon.setVisible(true);
        linksBakIcon.setSrc(imageDataStoreManager.getURL(linksBakImgPath).replace("\\", "/"));
        submitBtn.setDisabled(true);
        alertSucc(2);
      } else {
        saveOperatorLog(
            Constants.OPERATOR_LOG_I,
            Constants.OPERATOR_LOG_FAILURE,
            "广告【"
                + advertizeShowPageChoice.getValue()
                + ','
                + showType.getValue()
                + ','
                + sort.getValue()
                + "】添加失败。");
        alertError(MessageUtils.getMessage("ERR0012"));
      }
    }
  }
  @Override
  public void initPage() {
    advertizeShowPageChoice.setChoiceList(operationsManageService.getAdvertizeShowPageChoices());
    if ("U".equals(opType)) {
      txtLinksIcon.setVisible(false);
      txtLinksBakIcon.setVisible(false);
      // 检索数据
      AdvertizeDto dto = new AdvertizeDto();
      dto.setId(id);
      Map<String, Object> resultMap = operationsManageService.getAdvertizeById(dto);
      if (resultMap.isEmpty()) {
        alertError(MessageUtils.getMessage("ERR0013", "数据已被删除。"));
        submitBtn.setDisabled(true);
        return;
      }
      // 广告显示页面
      advertizeShowPageChoice.setSelectedValue(
          ConvUtils.convToString(resultMap.get("ADVERTIZE_SHOW_PAGE_ID")));
      // 广告类型
      showType.setSelectedValue(ConvUtils.convToString(resultMap.get("SHOW_TYPE")));
      // 排序
      sort.setValue(ConvUtils.convToString(resultMap.get("SORT")));
      if ("1".equals(showType.getValue())) {
        sort.setDisabled(false);
      } else {
        sort.setDisabled(true);
      }
      // 有效Flag
      validFlg.setSelectedValue(ConvUtils.convToString(resultMap.get("VALID_FLG")));
      // 图片
      linksIcon.setSrc(
          imageDataStoreManager
              .getURL(ConvUtils.convToString(resultMap.get("IMG_PATH")))
              .replace("\\", "/"));
      if (StringUtils.isEmpty(ConvUtils.convToString(resultMap.get("IMG_PATH")))) {
        linksIcon.setVisible(false);
      } else {
        linksIcon.setVisible(true);
      }
      // 背景图片
      linksBakIcon.setSrc(
          imageDataStoreManager
              .getURL(ConvUtils.convToString(resultMap.get("BACKGROUND_IMG_PATH")))
              .replace("\\", "/"));
      if (StringUtils.isEmpty(ConvUtils.convToString(resultMap.get("BACKGROUND_IMG_PATH")))) {
        linksBakIcon.setVisible(false);
      } else {
        linksBakIcon.setVisible(true);
      }
      // 链接地址
      linkUrl.setValue(ConvUtils.convToString(resultMap.get("LINK_URL")));

    } else {
      txtLinksIcon.setVisible(true);
      txtLinksBakIcon.setVisible(true);
      advertizeShowPageChoice.setSelectedIndex(0);
      showType.setSelectedValue("1");
      validFlg.setSelectedValue("1");
      linksIcon.setVisible(false);
      linksBakIcon.setVisible(false);
      linkUrl.setValue("http://");
    }
  }