/** * 检索条件DTO作成。 * * @param 没有 * @return 条件DTO */ private WealthManagerDto createCondition() { // 条件BEAN生成 WealthManagerDto dto = new WealthManagerDto(); dto.setWealthManagerId(wmId); // 每页起始位置 dto.setPageIndex(ConvUtils.convToInt(rptList.getFirstItemOffset())); // 每页最大件数 dto.setPageSize(ConvUtils.convToInt(rptList.getItemsPerPage())); // 条件BEAN返回 return dto; }
/** * 检索条件DTO作成。 * * @param 没有 * @return 条件DTO */ private FinanceUserAccountDto createCondition() { // 条件BEAN生成 FinanceUserAccountDto dto = new FinanceUserAccountDto(); dto.setAccountType(PrincipalAssignEnum.FINANCING_ACCOUNT.getValue()); dto.setFindKeywords(txtFind.getValue()); // 每页起始位置 dto.setPageIndex(ConvUtils.convToInt(rptList.getFirstItemOffset())); // 每页最大件数 dto.setPageSize(ConvUtils.convToInt(rptList.getItemsPerPage())); // 条件BEAN返回 return dto; }
/** * 检索条件DTO作成。 * * @param 没有 * @return 条件DTO */ private FinanceProdTenderDto createCondition() { // 条件BEAN生成 FinanceProdTenderDto dto = new FinanceProdTenderDto(); // 产品类型 dto.setOidFinanceProdId(ddlFinanceProdId.getValue()); // 检索Key dto.setSearchKey(txtFinanceCoutom.getValue()); // 每页起始位置 dto.setPageIndex(ConvUtils.convToInt(rptList.getFirstItemOffset())); // 每页最大件数 dto.setPageSize(ConvUtils.convToInt(rptList.getItemsPerPage())); // 条件BEAN返回 return dto; }
/** * 检索条件DTO作成。 * * @param 没有 * @return 条件DTO */ private UserRecoverDto createCondition() { UserRecoverDto dto = new UserRecoverDto(); dto.setOidUserId(oidUserId); dto.setRecoverYear(ddlYear.getSelectedValue()); dto.setRecoverMonth(ddlMonth.getSelectedValue()); if (StringUtils.isEmpty(ddlYear.getSelectedValue()) && !StringUtils.isEmpty(ddlMonth.getSelectedValue())) { dto.setRecoverYear(ConvUtils.convToString(DateUtils.getYear(DateUtils.getDate()))); } // 每页起始位置 dto.setPageIndex(ConvUtils.convToInt(rptList.getFirstItemOffset())); // 每页最大件数 dto.setPageSize(ConvUtils.convToInt(rptList.getItemsPerPage())); // 条件BEAN返回 return dto; }
protected void initComponent() { form = new FWForm("userform"); this.add(form); cnt = new FWLabel("cnt"); cnt.setRenderBodyOnly(true); form.add(cnt); // 数据容器生成 userDP = new GridDataProvider(); // 明细容器生成 rptList = new FWDataView("rptList", userDP, this); // 每页件数设定 rptList.setItemsPerPage(10); // 控件追加 form.add(rptList); // 分页处理 paging = new ILoanCustomPaging("paging", rptList, form, this); form.add(paging); txtFind = new FWTextField("txtFind"); form.add(txtFind); findBtn = new FWSubmitLink("findBtn", this); form.add(findBtn); }
@Override protected void initComponent() { form = new FWForm("form"); body.add(form); cnt = new FWLabel("cnt"); cnt.setRenderBodyOnly(true); form.add(cnt); // 数据容器生成 customerDP = new GridDataProvider(); // 明细容器生成 rptList = new FWDataView("rptList", customerDP, this); // 每页件数设定 rptList.setItemsPerPage(10); // 控件追加 form.add(rptList); // 分页处理 paging = new ILoanCustomPaging("paging", rptList, form, this); form.add(paging); wealthManager = new FWLabel("wealthManager"); wealthManager.setRenderBodyOnly(true); form.add(wealthManager); }
protected void rptList_PopulateItem(Item<Map<String, Object>> item) { Map<String, Object> dataRow = item.getModelObject(); // ID FWLabel index = new FWLabel("index"); index.setRenderBodyOnly(true); index.setValue(ConvUtils.convToString(rptList.getFirstItemOffset() + item.getIndex() + 1)); item.add(index); // 客户名 FWLabel customerName = new FWLabel("customerName"); customerName.setRenderBodyOnly(true); customerName.setValue(ConvUtils.convToString(dataRow.get("USER_NAME"))); item.add(customerName); // 手机 FWLabel mobile = new FWLabel("mobile"); mobile.setRenderBodyOnly(true); mobile.setValue(ConvUtils.convToString(dataRow.get("MOBILE"))); item.add(mobile); // 投资总额 FWLabel investedTotal = new FWLabel("investedTotal"); investedTotal.setRenderBodyOnly(true); investedTotal.setDefaultModelObject( ConvUtils.convToDecimal(dataRow.get("CUSTOMER_INVESTED_TOTAL"))); item.add(investedTotal); // 待收总额 FWLabel incomingTotal = new FWLabel("incomingTotal"); incomingTotal.setRenderBodyOnly(true); incomingTotal.setDefaultModelObject( ConvUtils.convToDecimal(dataRow.get("CUSTOMER_RECOVER_WAIT"))); item.add(incomingTotal); // 已回总额 FWLabel backTotal = new FWLabel("backTotal"); backTotal.setRenderBodyOnly(true); backTotal.setDefaultModelObject(ConvUtils.convToDecimal(dataRow.get("CUSTOMER_RECOVER_YES"))); item.add(backTotal); }
/** * 填充明细控件。 * * @param 明细结构体 * @return 没有 */ protected void rptList_PopulateItem(Item<Map<String, Object>> item) { Map<String, Object> dataRow = item.getModelObject(); // ID FWLabel index = new FWLabel("index"); index.setRenderBodyOnly(true); index.setValue(ConvUtils.convToString(rptList.getFirstItemOffset() + item.getIndex() + 1)); item.add(index); // 投资人 FWLabel tender = new FWLabel("tender"); tender.setRenderBodyOnly(true); item.add(tender); String mobile = ConvUtils.convToString(dataRow.get("MOBILE")); String email = ConvUtils.convToString(dataRow.get("EMAIL")); String connectChar = "/"; if (StringUtils.isEmpty(mobile) || StringUtils.isEmpty(email)) { connectChar = ""; } tender.setValue(mobile + connectChar + email); // 产品标题 FWModalPopupLink titleLink = new FWModalPopupLink("title"); titleLink.setLabel(ConvUtils.convToString(dataRow.get("FINANCE_PROD_TITLE"))); titleLink.add( AttributeModifier.replace( "onclick", "layer_show('450','','宝宝产品明细','" + fwContext.getContextRoot() + TransitionUrlConst.PROD_FINANCE_OPERATION_PAGE + "?" + PageParamConstant.VIEW_DETAIL + "=0&" + PageParamConstant.OBJECT_ID + "=" + dataRow.get("OID_FINANCE_PROD_ID") + "')")); item.add(titleLink); // 理财金额 FWLabel financeProdAmount = new FWLabel("financeProdAmount"); financeProdAmount.setRenderBodyOnly(true); financeProdAmount.setValue(ConvUtils.convToMoney(dataRow.get("FINANCE_PROD_AMOUNT"))); item.add(financeProdAmount); // 理财天数 FWLabel financeProdaDays = new FWLabel("financeProdaDays"); financeProdaDays.setRenderBodyOnly(true); financeProdaDays.setValue(ConvUtils.convToString(dataRow.get("FINANCE_PROD_DAYS"))); item.add(financeProdaDays); // 收益总额 FWLabel operationAmount = new FWLabel("operationAmount"); operationAmount.setRenderBodyOnly(true); operationAmount.setValue(ConvUtils.convToMoney(dataRow.get("OPERATION_AMOUNT"))); item.add(operationAmount); }
protected void rptList_PopulateItem(Item<Map<String, Object>> item) { Map<String, Object> dataRow = item.getModelObject(); // ID FWLabel index = new FWLabel("index"); index.setRenderBodyOnly(true); index.setValue(ConvUtils.convToString(rptList.getFirstItemOffset() + item.getIndex() + 1)); item.add(index); // 用户名称 FWModalPopupLink userName = new FWModalPopupLink("userName"); userName.setLabel(ConvUtils.convToString(dataRow.get("USER_NAME"))); userName.add( AttributeModifier.replace( "onclick", "layer_show('360','','" + ConvUtils.convToString(dataRow.get("USER_NAME")) + "','" + fwContext.getContextRoot() + TransitionUrlConst.USER_DETAIL_PAGE + "?USER_ID=" + ConvUtils.convToString(dataRow.get("OID_USER_ID")) + "')")); item.add(userName); // 手机 FWLabel mobile = new FWLabel("mobile"); mobile.setRenderBodyOnly(true); mobile.setValue(ConvUtils.convToString(dataRow.get("MOBILE"))); item.add(mobile); // 邮箱 FWLabel email = new FWLabel("email"); email.setRenderBodyOnly(true); if (!StringUtils.isEmpty(ConvUtils.convToString(dataRow.get("EMAIL")))) { email.setValue( ConvUtils.convToString(dataRow.get("EMAIL")) + " " + (ConvUtils.convToBool(dataRow.get("EMAIL_VERIFY_FLG")) ? "已验证" : "未验证")); } else { email.setValue("未填写"); } item.add(email); FWContainer selectBtn = new FWContainer("selectBtn"); selectBtn.add( AttributeModifier.replace( "onclick", "selectUserAccount('" + ConvUtils.convToString(dataRow.get("USER_NAME")) + "', '" + ConvUtils.convToString(dataRow.get("OID_USER_ID")) + "', '" + ConvUtils.convToString(dataRow.get("BORROWER_NAME")) + "', '" + ConvUtils.convToString(dataRow.get("BORROWER_ID_CARD")) + "')")); item.add(selectBtn); }
/** * 初始化画面。 * * @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 protected void initComponent() { // 用户损益表页面跳转至本页面时user的取得 if (!StringUtils.isEmpty(getParameter(EncryptUtil.encryptMD5("oidUserId")))) { oidUserId = new DesEncryptUtil().decrypt(getParameter(EncryptUtil.encryptMD5("oidUserId"))); } // 用户账户资金查询页面跳转至本页面时currentPage保存 if (!StringUtils.isEmpty(getParameter("currentPage"))) { currentPage = getParameter("currentPage"); } // 用户账户资金查询页面跳转至本页面时userType保存 if (!StringUtils.isEmpty(getParameter("userType"))) { userType = getParameter("userType"); } // 用户账户资金查询页面跳转至本页面时find保存 if (!StringUtils.isEmpty(getParameter("find"))) { find = getParameter("find"); } form = new FWForm("form", this); body.add(form); ddlYear = new FWDropDownChoice("ddlYear", year, true, this); form.add(ddlYear); ddlMonth = new FWDropDownChoice("ddlMonth", month, true, this); form.add(ddlMonth); cnt = new FWLabel("cnt"); cnt.setRenderBodyOnly(true); form.add(cnt); // 数据容器生成 recoverDetailDP = new GridDataProvider(); // 明细容器生成 rptList = new FWDataView("rptList", recoverDetailDP, this); // 每页件数设定 rptList.setItemsPerPage(getItemsPerPage()); // 控件追加 form.add(rptList); // 分页处理 paging = new ILoanCustomPaging("paging", rptList, form, this); form.add(paging); lnkRtn = new FWLink("lnkRtn", this); form.add(lnkRtn); }
/** * 填充控件。 * * @param 没有 * @return 没有 */ @Override protected void initComponent() { form = new FWForm("form"); body.add(form); // 数据件数 cnt = new FWLabel("cnt"); form.add(cnt); grdContainser = new FWContainer("grdContainser"); form.add(grdContainser); // 明细容器生成 adminDP = new GridDataProvider(); rptList = new FWDataView("rptList", adminDP, this); // 每页件数设定 rptList.setItemsPerPage(getItemsPerPage()); grdContainser.add(rptList); // 分页处理 paging = new ILoanCustomPaging("paging", rptList, form, this); form.add(paging); // 产品类型 ddlFinanceProdId = new FWDropDownChoice("ddlFinanceProdId", new ArrayList<ChoiceNameValue>(), false, this); ddlFinanceProdId.setSelectedValue(""); ddlFinanceProdId.setAjaxOnSubmitEnable(true); form.add(ddlFinanceProdId); // 投资用户 txtFinanceCoutom = new FWTextField("txtFinanceCoutom"); form.add(txtFinanceCoutom); // 检索按钮 findBtn = new FWSubmitLink("findBtn", this); form.add(findBtn); ajaxComponentBind(); }
protected void rptList_PopulateItem(Item<Map<String, Object>> item) { Map<String, Object> dataRow = item.getModelObject(); // ID FWLabel index = new FWLabel("index"); index.setRenderBodyOnly(true); index.setValue(ConvUtils.convToString(rptList.getFirstItemOffset() + item.getIndex() + 1)); item.add(index); // 产品标题 FWLabel productTitle = new FWLabel("productTitle"); productTitle.setRenderBodyOnly(true); productTitle.setDefaultModelObject(ConvUtils.convToString(dataRow.get("PRODUCTS_TITLE"))); item.add(productTitle); // 应回款日期 FWLabel date = new FWLabel("date"); date.setRenderBodyOnly(true); date.setDefaultModelObject(ConvUtils.convToString(dataRow.get("RECOVER_DATE"))); item.add(date); // 应回款本金 FWLabel amountCapital = new FWLabel("amountCapital"); amountCapital.setRenderBodyOnly(true); amountCapital.setDefaultModelObject( ConvUtils.convToDecimal(dataRow.get("RECOVER_AMOUNT_CAPITAL"))); item.add(amountCapital); // 应回款利息 FWLabel amountInterest = new FWLabel("amountInterest"); amountInterest.setRenderBodyOnly(true); amountInterest.setDefaultModelObject( ConvUtils.convToDecimal(dataRow.get("RECOVER_AMOUNT_INTEREST"))); item.add(amountInterest); // 应回款总额 FWLabel amountTotal = new FWLabel("amountTotal"); amountTotal.setRenderBodyOnly(true); amountTotal.setDefaultModelObject(ConvUtils.convToDecimal(dataRow.get("RECOVER_AMOUNT_TOTAL"))); item.add(amountTotal); // 实际回款日期 FWLabel dateYes = new FWLabel("dateYes"); dateYes.setRenderBodyOnly(true); dateYes.setDefaultModelObject(ConvUtils.convToString(dataRow.get("RECOVER_DATE_YES"))); item.add(dateYes); // 实际回款本金 FWLabel amountCapitalYes = new FWLabel("amountCapitalYes"); amountCapitalYes.setRenderBodyOnly(true); amountCapitalYes.setDefaultModelObject( ConvUtils.convToDecimal(dataRow.get("RECOVER_AMOUNT_CAPITAL_YES"))); item.add(amountCapitalYes); // 实际回款利息 FWLabel amountInterestYes = new FWLabel("amountInterestYes"); amountInterestYes.setRenderBodyOnly(true); amountInterestYes.setDefaultModelObject( ConvUtils.convToDecimal(dataRow.get("RECOVER_AMOUNT_INTEREST_YES"))); item.add(amountInterestYes); // 实际回款总额 FWLabel amountTotalYes = new FWLabel("amountTotalYes"); amountTotalYes.setRenderBodyOnly(true); amountTotalYes.setDefaultModelObject( ConvUtils.convToDecimal(dataRow.get("RECOVER_AMOUNT_TOTAL_YES"))); item.add(amountTotalYes); // 回款状态 FWLabel status = new FWLabel("status"); status.setDefaultModelObject( RecoverFlgEnum.getEnumDisp(ConvUtils.convToString(dataRow.get("RECOVER_FLG"))).getValue()); item.add(status); // 回款状态样式控制 if (RecoverFlgEnum.RECOVER_STATUS_NO .getValue() .equals(ConvUtils.convToString(dataRow.get("RECOVER_FLG")))) { status.add(AttributeModifier.replace("class", "label label-default")); } else if (RecoverFlgEnum.RECOVER_STATUS_YES .getValue() .equals(ConvUtils.convToString(dataRow.get("RECOVER_FLG")))) { status.add(AttributeModifier.replace("class", "label label-success")); } }
protected void findBtn_OnSubmit() { rptList.setCurrentPage(0); initPage(); }