fix:信用卡账单功能完善。
This commit is contained in:
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 期货基本合约Dto对象 invest_future_base_infor
|
||||
*
|
||||
@@ -29,4 +30,8 @@ public class FutureBaseInforDto implements Serializable
|
||||
@ApiModelProperty(value="标准合约id")
|
||||
private Long standardId;
|
||||
|
||||
/** 最后交易日 */
|
||||
@ApiModelProperty(value="最后交易日")
|
||||
private String lastTradingDay;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
package com.intc.invest.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.intc.common.core.annotation.Excel;
|
||||
import com.intc.invest.domain.CreditCardBill;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 信用卡账单Vo对象 credit_card_bill
|
||||
*
|
||||
@@ -29,5 +33,18 @@ public class CreditCardBillVo extends CreditCardBill
|
||||
@ApiModelProperty(value="POS刷卡占比)")
|
||||
private String posRate;
|
||||
|
||||
@ApiModelProperty(value="可用余额)")
|
||||
private Double availableLimit;
|
||||
|
||||
/** 还款日 */
|
||||
@ApiModelProperty(value="账单日")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date repaymentDay;
|
||||
|
||||
/** 还款日 */
|
||||
@ApiModelProperty(value="还款日)")
|
||||
private int payDate;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -69,6 +69,7 @@ public class CreditCardBillServiceImpl implements ICreditCardBillService
|
||||
{
|
||||
List<CreditCardBillVo> creditCardBillList=creditCardBillMapper.selectCreditCardBillList(creditCardBillDto);
|
||||
//修改名称加卡号
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // 设置日期格式
|
||||
DecimalFormat decimalFormat = new DecimalFormat("#.###");
|
||||
for (CreditCardBillVo creditCardBill : creditCardBillList) {
|
||||
if(creditCardBill.getBankName()!=null){
|
||||
@@ -82,6 +83,23 @@ public class CreditCardBillServiceImpl implements ICreditCardBillService
|
||||
creditCardBill.setPosRate("--");
|
||||
}
|
||||
|
||||
String repaymentDayStr = sdf.format(creditCardBill.getBillDate()).split("-")[0] + "-" + sdf.format(creditCardBill.getBillDate()).split("-")[1] + "-" + String.format("%02d", creditCardBill.getPayDate());
|
||||
try {
|
||||
Date repaymentDay=sdf.parse(repaymentDayStr);
|
||||
if(repaymentDay.before(creditCardBill.getBillDate())){
|
||||
// 加一个月
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(repaymentDay);
|
||||
calendar.add(Calendar.MONTH, 1);
|
||||
repaymentDay = calendar.getTime();
|
||||
creditCardBill.setRepaymentDay(repaymentDay);
|
||||
}else {
|
||||
creditCardBill.setRepaymentDay(repaymentDay);
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
}
|
||||
return creditCardBillList;
|
||||
}
|
||||
|
||||
@@ -225,7 +225,10 @@ public class FuturesDailyHistoryServiceImpl implements IFuturesDailyHistoryServi
|
||||
*/
|
||||
@Override
|
||||
public void synTodayFuturesDailyHistory() {
|
||||
List<FutureBaseInforVo> futureBaseInforVos=futureBaseInforMapper.selectFutureBaseInforList(new FutureBaseInforDto());
|
||||
FutureBaseInforDto dto=new FutureBaseInforDto();
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
||||
dto.setLastTradingDay(formatter.format(new Date()));
|
||||
List<FutureBaseInforVo> futureBaseInforVos= futureBaseInforMapper.selectFutureBaseInforList(dto);
|
||||
//
|
||||
for (FutureBaseInforVo base : futureBaseInforVos) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user