/** @param containAll 是否包含"全部"条目项. */ private void initSuggestAuditStatusList(boolean containAll) { this.suggestAuditStatusList.clear(); if (containAll) { CodeItem all = new CodeItem("", "全部"); this.suggestAuditStatusList.add(all); } this.suggestAuditStatusList.add( new CodeItem( Constant.EBK_SUGGEST_AUDIT_STATUS.PASSED_AUDIT.name(), Constant.EBK_SUGGEST_AUDIT_STATUS.PASSED_AUDIT.getCnName())); this.suggestAuditStatusList.add( new CodeItem( Constant.EBK_SUGGEST_AUDIT_STATUS.UNPASSED_AUDIT.name(), Constant.EBK_SUGGEST_AUDIT_STATUS.UNPASSED_AUDIT.getCnName())); }
/** 进行审核动作,确认审核通过或审核不通过. */ @Action("confirmAuditStatus") public void confirmAuditStatus() { Map<String, Object> param = new HashMap<String, Object>(); String auditedStatus = super.getRequestParameter("auditedStatus"); EbkHousePrice ehp = ebkHousePriceService.selectByPrimaryKey(housePriceId); if (ehp == null) { param.put("success", false); param.put("errorMessage", "更新失败!"); this.sendAjaxResultByJson(JSONObject.fromObject(param).toString()); return; } if (!ehp.getStatus().equals(Constant.EBK_SUGGEST_AUDIT_STATUS.WAITING_FOR_AUDIT.name())) { param.put("success", false); param.put("errorMessage", "更新失败!"); this.sendAjaxResultByJson(JSONObject.fromObject(param).toString()); return; } ehp.setStatus(auditedStatus); ehp.setConfirmTime(new Date()); ehp.setConfirmUser(super.getSessionUserName()); try { if (ehp.getStatus().equalsIgnoreCase(Constant.EBK_SUGGEST_AUDIT_STATUS.PASSED_AUDIT.name())) { this.updateRouteStockTimePrice(ehp); } this.ebkHousePriceService.updateByPrimaryKey(ehp); param.put("success", true); param.put("errorMessage", "无"); } catch (Exception ioe) { param.put("success", false); param.put("errorMessage", "更新失败!" + ioe.getMessage()); } finally { this.sendAjaxResultByJson(JSONObject.fromObject(param).toString()); } }
/** * 已审核(审核通过、审核不通过)房价变价列表页面. * * @return */ @Action("ebkRouteStockList") public String ebkRouteStockList() { this.initSuggestAuditStatusList(true); Map<String, Object> params = new HashMap<String, Object>(); // 申请状态查询条件:为空或全部时查询"审核通过"、"审核不通过". if (StringUtils.isEmpty(this.ebkHousePrice.getStatus()) || "ALL".equals(this.ebkHousePrice.getStatus())) { params.put( "includeAduitStatus", new String[] { Constant.EBK_SUGGEST_AUDIT_STATUS.PASSED_AUDIT.name(), Constant.EBK_SUGGEST_AUDIT_STATUS.UNPASSED_AUDIT.name() }); } else { params.put("status", this.ebkHousePrice.getStatus()); } // 申请单号 if (this.ebkHousePrice.getHousePriceId() != null) { params.put("housePriceId", this.ebkHousePrice.getHousePriceId()); } // 提交时间. if (this.createTimeBegin != null && !StringUtils.isEmpty(this.createTimeBegin)) { params.put("createTimeBegin", this.createTimeBegin); } if (this.createTimeEnd != null && !StringUtils.isEmpty(this.createTimeEnd)) { params.put("createTimeEnd", this.createTimeEnd); } // 提交人. if (this.ebkHousePrice.getSubmitUser() != null && !StringUtils.isEmpty(this.ebkHousePrice.getSubmitUser())) { params.put("submitUser", this.ebkHousePrice.getSubmitUser().trim()); } // 供应商名称. if (this.ebkHousePrice.getSupplierId() != null) { params.put("supplierId", this.ebkHousePrice.getSupplierId()); } params.put("productType", Constant.PRODUCT_TYPE.ROUTE.name()); params.put("applyType", Constant.EBK_HOUSE_PRICE_APPLY_TYPE.STOCK_APPLY.name()); this.ebkHousePricePage.setTotalResultSize( this.ebkHousePriceService.countEbkHousePriceListByExample(params)); ebkHousePricePage.buildUrl(getRequest()); ebkHousePricePage.setCurrentPage(this.page); params.put("start", ebkHousePricePage.getStartRows()); params.put("end", ebkHousePricePage.getEndRows()); params.put("orderby", "CREATE_TIME"); params.put("order", "DESC"); this.ebkHousePriceList = this.ebkHousePriceService.findEbkHousePriceListByExample(params); this.ebkHousePricePage.setItems(this.ebkHousePriceList); return "ebkRouteStockList"; }