/** * 查询竞拍中的债权 * * @return */ public String queryAuctingDebt() { String borrowTitle = SqlInfusion.FilteSqlInfusion(request("borrowTitle")); String borrowerName = SqlInfusion.FilteSqlInfusion(request("borrowerName")); pageBean.setPageNum(request("curPage")); long userId = this.getUserId(); try { assignmentDebtService.queryAuctingDebt(userId, borrowTitle, borrowerName, "2", pageBean); List<Map<String, Object>> list = pageBean.getPage(); if (list != null) { Date nowDate = new Date(); for (Map<String, Object> map : list) { Date date = (Date) map.get("remainAuctionTime"); map.put("remainDays", DateUtil.remainDateToString(nowDate, date)); } } } catch (SQLException e) { log.error(e); e.printStackTrace(); } this.setRequestToParamMap(); return SUCCESS; }
/** 添加债权转让 */ public String addAssignmentDebt() throws IOException { long userId = this.getUserId(); // double auctionBasePrice = Convert.strToDouble(paramMap.get("auctionBasePrice"), -1); // double debtSum = Convert.strToDouble(paramMap.get("debtSum"), -1); // double lowerPrice = debtSum*0.5; // if(auctionBasePrice < lowerPrice || auctionBasePrice > debtSum){ // JSONUtils.printStr2("转让价格范围错误"); // return null; // } paramMap.put("alienatorId", userId + ""); paramMap.put("applyTime", DateUtil.dateToString(new Date())); long reslut = -1; try { reslut = assignmentDebtService.addAssignmentDebt(paramMap); // JSONObject json = JSONObject.fromObject(ChinaPnRInterface.creditAssign(OrdId, SellCustId, // CreditAmt, CreditDealAmt, BidDetails, Fee, DivDetails, BuyCustId, OrdDate); } catch (SQLException e) { log.error(e); e.printStackTrace(); } try { if (reslut != -1) { JSONUtils.printStr("1"); } else { JSONUtils.printStr("-1"); } } catch (IOException e) { log.error(e); e.printStackTrace(); } return null; }