/**
  * 跳转到审核页面
  *
  * @param id
  * @param map
  * @return
  */
 @RequestMapping(value = "/toReview/{id}", method = RequestMethod.GET)
 public String preReview(@PathVariable Long id, Map<String, Object> map) {
   TransRecordReviewForm transRecordForm = new TransRecordReviewForm();
   transRecordForm.setResult(TransStatusEnum.S.getValue());
   transRecordForm.setTransRecordId(id);
   map.put("transRecordForm", transRecordForm);
   Long transRecordId = transRecordForm.getTransRecordId();
   if (null != transRecordId) {
     List<BizAttach> sumList = new ArrayList<BizAttach>();
     List<BizAttach> list =
         attachService.findByRefIdAndAttachTypeOrderByGmtCreateDesc(
             transRecordId, "biz_trans_record1");
     List<BizAttach> list2 =
         attachService.findByRefIdAndAttachTypeOrderByGmtCreateDesc(
             transRecordId, "biz_trans_record2");
     if (!CollectionUtils.isEmpty(list2)) {
       sumList.addAll(list2);
     }
     if (!CollectionUtils.isEmpty(list)) {
       sumList.addAll(list);
     }
     map.put("attachs", sumList);
   }
   return REVIEW;
 }
 @RequestMapping(
     value = "/showReviewed/{id}",
     method = {RequestMethod.GET, RequestMethod.POST})
 public String showReviewed(@PathVariable Long id, Page page, Map<String, Object> map) {
   BizTransRecord transRecord = transRecordService.get(id);
   if (null != transRecord) {
     long memberId = transRecord.getMemberId();
     List<BizTransRecord> list =
         transRecordService.findTransRrcordByMemberAndTypeAndStatus(
             page, memberId, transRecord.getInvestType(), TransStatusEnum.S.getValue());
     List<Map<String, String>> temp = new ArrayList<Map<String, String>>();
     double divi = 1000000.0;
     for (BizTransRecord 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;
 }
 @RequestMapping(value = "/reviewTransRecord", method = RequestMethod.POST)
 public @ResponseBody String reviewTransRecord(
     TransRecordReviewForm form, HttpServletRequest request) {
   BizTransRecord transRecord = transRecordService.get(form.getTransRecordId());
   // 后续应加上判断此刻该记录的状态,应先锁,后判断状态,再更新
   if (isPass(form)) {
     transRecord.setStatus(TransStatusEnum.S.getValue());
     transRecord.setGmtValidate(DateUtil.getNowDate());
   } else {
     transRecord.setStatus(TransStatusEnum.F.getValue());
   }
   transRecordService.saveWithStatisAndReview(transRecord, form);
   return new AjaxObject("审核成功").toString();
 }