/** * @param map * @return */ @RequestMapping( value = "/myTransRecords", method = {RequestMethod.GET, RequestMethod.POST}) public @ResponseBody String myTransRecords( Page page, Map<String, Object> map, HttpServletRequest request) { BizMember member = (BizMember) HttpReceiver.getHttpSession().getAttribute("member"); if (null == member) { return AjaxReturnInfo.returnErr("请您先首页登录!"); } List<BizTransRecordVO> recordVOS = transRecordService.findTransRecordByUserForSubmit(page, member.getId()); List<Map<String, String>> temp = new ArrayList<Map<String, String>>(); double divi = 100.0; for (BizTransRecordVO recordVO : recordVOS) { Map<String, String> tempMap = new HashMap<String, String>(); tempMap.put("id", recordVO.getId() + ""); tempMap.put("investTypeStr", recordVO.getInvestTypeStr()); tempMap.put("importDate", recordVO.getImportDate()); tempMap.put( "currIncomeWYuan", (null == recordVO.getCurrIncome() ? 0 : recordVO.getCurrIncome()) / divi + ""); tempMap.put( "currOutcomeWYuan", (null == recordVO.getCurrOutcome() ? 0 : recordVO.getCurrOutcome()) / divi + ""); tempMap.put("currValueWYuan", recordVO.getCurrValue() / divi + ""); tempMap.put( "lastDayValueWYuan", (null == recordVO.getLastDayValue() ? 0 : recordVO.getLastDayValue()) / divi + ""); tempMap.put("status", recordVO.getStatus()); String statusName = ""; if (StringUtils.equals(recordVO.getStatus(), "I")) { statusName = "审核中"; } else if (StringUtils.equals(recordVO.getStatus(), "S")) { statusName = "审核通过"; } else if (StringUtils.equals(recordVO.getStatus(), "F")) { BizReviewLog log = reviewLogService.getBizReviewLog(recordVO.getId(), "TRANS_RECORD"); if (null != log) { tempMap.put("failReason", log.getComment()); } statusName = "审核退回"; } else { statusName = "莫名其妙"; } tempMap.put("statusName", statusName); temp.add(tempMap); } return PageUtils.toJsonString(page, temp); }
@RequestMapping( value = "/showReviewed1/{id}", method = {RequestMethod.GET, RequestMethod.POST}) public String showReviewed1(@PathVariable Long id, Page page, Map<String, Object> map) { List<BizTransRecordVO> list = transRecordService.findTransRrcordByMemberAndTypeAndStatusForWeek( page, id, TransStatusEnum.S.getValue()); List<Map<String, String>> temp = new ArrayList<Map<String, String>>(); double divi = 1000000.0; for (BizTransRecordVO recordVO : list) { Map<String, String> tempMap = new HashMap<String, String>(); tempMap.put("id", recordVO.getId() + ""); tempMap.put( "investTypeStr", InvestDirectionEnum.getInvestDirectionEnum(recordVO.getInvestType()).getName()); tempMap.put("importDate", recordVO.getImportDate()); tempMap.put( "currIncomeWYuan", (null == recordVO.getCurrIncome() ? 0 : recordVO.getCurrIncome()) / divi + ""); tempMap.put( "currOutcomeWYuan", (null == recordVO.getCurrOutcome() ? 0 : recordVO.getCurrOutcome()) / divi + ""); tempMap.put("currValueWYuan", recordVO.getCurrValue() / divi + ""); tempMap.put( "lastDayValueWYuan", (null == recordVO.getLastDayValue() ? 0 : recordVO.getLastDayValue()) / divi + ""); tempMap.put("status", recordVO.getStatus()); String statusName = ""; if (StringUtils.equals(recordVO.getStatus(), "I")) { statusName = "审核中"; } else if (StringUtils.equals(recordVO.getStatus(), "S")) { statusName = "审核通过"; } else if (StringUtils.equals(recordVO.getStatus(), "F")) { BizReviewLog log = reviewLogService.getBizReviewLog(recordVO.getId(), "TRANS_RECORD"); if (null != log) { tempMap.put("failReason", log.getComment()); } statusName = "审核退回"; } else { statusName = "莫名其妙"; } tempMap.put("statusName", statusName); temp.add(tempMap); } map.put("page", page); map.put("data", temp); return SHOW_REVIEWED; }