fix:信用卡账单功能完善。
This commit is contained in:
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 期货基本合约Dto对象 invest_future_base_infor
|
* 期货基本合约Dto对象 invest_future_base_infor
|
||||||
*
|
*
|
||||||
@@ -29,4 +30,8 @@ public class FutureBaseInforDto implements Serializable
|
|||||||
@ApiModelProperty(value="标准合约id")
|
@ApiModelProperty(value="标准合约id")
|
||||||
private Long standardId;
|
private Long standardId;
|
||||||
|
|
||||||
|
/** 最后交易日 */
|
||||||
|
@ApiModelProperty(value="最后交易日")
|
||||||
|
private String lastTradingDay;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
package com.intc.invest.domain.vo;
|
package com.intc.invest.domain.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.intc.common.core.annotation.Excel;
|
import com.intc.common.core.annotation.Excel;
|
||||||
import com.intc.invest.domain.CreditCardBill;
|
import com.intc.invest.domain.CreditCardBill;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 信用卡账单Vo对象 credit_card_bill
|
* 信用卡账单Vo对象 credit_card_bill
|
||||||
*
|
*
|
||||||
@@ -29,5 +33,18 @@ public class CreditCardBillVo extends CreditCardBill
|
|||||||
@ApiModelProperty(value="POS刷卡占比)")
|
@ApiModelProperty(value="POS刷卡占比)")
|
||||||
private String posRate;
|
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);
|
List<CreditCardBillVo> creditCardBillList=creditCardBillMapper.selectCreditCardBillList(creditCardBillDto);
|
||||||
//修改名称加卡号
|
//修改名称加卡号
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // 设置日期格式
|
||||||
DecimalFormat decimalFormat = new DecimalFormat("#.###");
|
DecimalFormat decimalFormat = new DecimalFormat("#.###");
|
||||||
for (CreditCardBillVo creditCardBill : creditCardBillList) {
|
for (CreditCardBillVo creditCardBill : creditCardBillList) {
|
||||||
if(creditCardBill.getBankName()!=null){
|
if(creditCardBill.getBankName()!=null){
|
||||||
@@ -82,6 +83,23 @@ public class CreditCardBillServiceImpl implements ICreditCardBillService
|
|||||||
creditCardBill.setPosRate("--");
|
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;
|
return creditCardBillList;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -225,7 +225,10 @@ public class FuturesDailyHistoryServiceImpl implements IFuturesDailyHistoryServi
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void synTodayFuturesDailyHistory() {
|
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) {
|
for (FutureBaseInforVo base : futureBaseInforVos) {
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="remark" column="remark" />
|
<result property="remark" column="remark" />
|
||||||
<result property="posCount" column="pos_count" />
|
<result property="posCount" column="pos_count" />
|
||||||
<result property="dailyExpensesCount" column="daily_expenses_count" />
|
<result property="dailyExpensesCount" column="daily_expenses_count" />
|
||||||
|
<result property="availableLimit" column="available_limit" />
|
||||||
|
<result property="payDate" column="pay_date" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectCreditCardBillVo">
|
<sql id="selectCreditCardBillVo">
|
||||||
@@ -40,7 +42,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
a.bill_state,
|
a.bill_state,
|
||||||
a.remark,
|
a.remark,
|
||||||
bc."name" as bank_name,
|
bc."name" as bank_name,
|
||||||
|
bc.pay_date,
|
||||||
bc.code as bank_code,
|
bc.code as bank_code,
|
||||||
|
a2.available_limit,
|
||||||
(
|
(
|
||||||
select
|
select
|
||||||
count(*)
|
count(*)
|
||||||
@@ -83,6 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
credit_card_bill a
|
credit_card_bill a
|
||||||
left join bank_card_lend bc on
|
left join bank_card_lend bc on
|
||||||
bc.id = a.credit_card_id
|
bc.id = a.credit_card_id
|
||||||
|
left join accounts a2 on a2.id =a.credit_card_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectCreditCardBillList" parameterType="CreditCardBillDto" resultMap="CreditCardBillResult">
|
<select id="selectCreditCardBillList" parameterType="CreditCardBillDto" resultMap="CreditCardBillResult">
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<!-- 数据范围过滤 -->
|
<!-- 数据范围过滤 -->
|
||||||
${params.dataScope}
|
${params.dataScope}
|
||||||
order by
|
order by
|
||||||
a.query_institution desc
|
a.query_date desc
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -67,6 +67,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="name != null and name != ''"> and a.name like '%'|| #{name}||'%'</if>
|
<if test="name != null and name != ''"> and a.name like '%'|| #{name}||'%'</if>
|
||||||
<if test="code != null and code != ''"> and a.code = #{code}</if>
|
<if test="code != null and code != ''"> and a.code = #{code}</if>
|
||||||
<if test="standardId != null "> and a.standard_id = #{standardId}</if>
|
<if test="standardId != null "> and a.standard_id = #{standardId}</if>
|
||||||
|
<if test="lastTradingDay!=null and lastTradingDay !=''">
|
||||||
|
and to_char(a.last_trading_day, 'yyyy-MM-dd')>=#{lastTradingDay}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by a.create_time desc
|
order by a.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
Reference in New Issue
Block a user