@RequestMapping(value = "/update/{id}", method = RequestMethod.GET) public String preUpdate(@PathVariable Long id, Map<String, Object> map) { BizTransRecord transRecord = transRecordService.get(id); if (null == transRecord) { return UPDATE; } map.put("id", transRecord.getId() + ""); map.put("investType", transRecord.getInvestType()); map.put( "investTypeName", InvestDirectionEnum.getInvestDirectionEnum(transRecord.getInvestType()).getName()); map.put("fee", getRealValue(transRecord.getFee())); map.put("gainsAndLosses", getRealValue(transRecord.getGainsAndLosses())); map.put("currIncome", getRealValue(transRecord.getCurrIncome())); map.put("currOutcome", getRealValue(transRecord.getCurrOutcome())); map.put("currValue", getRealValue(transRecord.getCurrValue())); map.put("lastDayValue", getRealValue(transRecord.getLastDayValue())); map.put("totalGainsAndLosses", transRecord.getTotalGainsAndLosses()); map.put("origionValue", getRealValue(transRecord.getOrigionValue())); map.put("status", transRecord.getStatus()); map.put("importDate", transRecord.getImportDate()); BizReviewLog log = reviewLogService.getBizReviewLog(transRecord.getId(), "TRANS_RECORD"); if (null != log) { map.put("failReason", log.getComment()); } return UPDATE; }
@RequestMapping( value = "/modifyLast/{id}", method = {RequestMethod.GET, RequestMethod.POST}) public String modifyLast(@PathVariable Long id, String type, Map<String, Object> map, Page page) { type = StringUtils.isBlank(type) ? InvestDirectionEnum.QI_HUO.getValue() : type; BizTransRecordVO vo; try { vo = transRecordService.findLastRecord(id, type); if (null != vo) { BizTransRecord transRecord = transRecordService.get(vo.getId()); map.put("id", transRecord.getId() + ""); map.put("investType", transRecord.getInvestType()); map.put( "investTypeName", InvestDirectionEnum.getInvestDirectionEnum(transRecord.getInvestType()).getName()); map.put("fee", getRealValue(transRecord.getFee())); map.put("gainsAndLosses", getRealValue(transRecord.getGainsAndLosses())); map.put("currIncome", getRealValue(transRecord.getCurrIncome())); map.put("currOutcome", getRealValue(transRecord.getCurrOutcome())); map.put("currValue", getRealValue(transRecord.getCurrValue())); map.put("lastDayValue", getRealValue(transRecord.getLastDayValue())); map.put("totalGainsAndLosses", transRecord.getTotalGainsAndLosses()); map.put("origionValue", getRealValue(transRecord.getOrigionValue())); map.put("status", transRecord.getStatus()); map.put("importDate", transRecord.getImportDate()); map.put("memberId", transRecord.getMemberId() + ""); } else { return null; } } catch (Exception e) { e.printStackTrace(); } return MODIFY_LAST; }