Ejemplo n.º 1
0
  /** 添加债权转让 */
  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;
  }