Browse Source

优化

zhanglei
dimengzhe 1 year ago
parent
commit
296f835d30
  1. 9
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesapply/LoanSecondarySalesApplyService.java
  2. 6
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesbidding/LoanSecondarySalesBiddingService.java

9
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesapply/LoanSecondarySalesApplyService.java

@ -537,7 +537,7 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon
BigDecimal prices = BigDecimal.ZERO;
if (loanSecondarySalesCost.getVehPrice().compareTo(loanSecondarySalesCost.getVehicleEvaluation()) > 0) {
prices = loanSecondarySalesCost.getVehPrice();
}else{
} else {
prices = loanSecondarySalesCost.getVehicleEvaluation();
}
loanSecondarySalesBiddingDto.setPrice(prices.toString());
@ -1030,15 +1030,16 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon
}
}
loanSecondarySalesApplyDetailsVo.setLoanSecondarySalesCost(loanSecondarySalesCost);
if(StringUtils.isNotBlank(loanSecondarySalesApply.getValidityDate())){
if (StringUtils.isNotBlank(loanSecondarySalesApply.getValidityDate())) {
DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
DateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd");
Date date = new Date();
String nowtime = sdf.format(date);//当前时间
String endtime = loanSecondarySalesApply.getValidityDate(); //到期时间
try {
if (sdf.parse(nowtime).getTime() > sdf.parse(endtime).getTime()) {//转成long类型比较
if (sdf.parse(nowtime).getTime() > sdf1.parse(endtime).getTime()) {//转成long类型比较
loanSecondarySalesApplyDetailsVo.setValidate(false);
} else if (sdf.parse(nowtime).getTime() <= sdf.parse(endtime).getTime()) {
} else if (sdf.parse(nowtime).getTime() <= sdf1.parse(endtime).getTime()) {
loanSecondarySalesApplyDetailsVo.setValidate(true);
}
} catch (ParseException e) {

6
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesbidding/LoanSecondarySalesBiddingService.java

@ -111,14 +111,16 @@ public class LoanSecondarySalesBiddingService extends MybatisBaseService<LoanSec
String vinNo = baseMapper.getVinNo(sid);
salesBiddingVo.setVinNo(vinNo);
DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
DateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd");
Date date = new Date();
String nowtime = sdf.format(date);//当前时间
LoanSecondarySalesApply loanSecondarySalesApply = loanSecondarySalesApplyService.fetchBySid(sid);
String endtime = loanSecondarySalesApply.getValidityDate(); //到期时间
try {
if (sdf.parse(nowtime).getTime() > sdf.parse(endtime).getTime()) {//转成long类型比较
if (sdf.parse(nowtime).getTime() > sdf1.parse(endtime).getTime()) {//转成long类型比较
salesBiddingVo.setValidate(false);
} else if (sdf.parse(nowtime).getTime() <= sdf.parse(endtime).getTime()) {
} else if (sdf.parse(nowtime).getTime() <= sdf1.parse(endtime).getTime()) {
salesBiddingVo.setValidate(true);
}
} catch (ParseException e) {

Loading…
Cancel
Save