Browse Source

优化

zhanglei
dimengzhe 1 year ago
parent
commit
6bf1cd3ee9
  1. 25
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesapply/LoanSecondarySalesApplyService.java

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

@ -1028,19 +1028,22 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon
} }
} }
loanSecondarySalesApplyDetailsVo.setLoanSecondarySalesCost(loanSecondarySalesCost); loanSecondarySalesApplyDetailsVo.setLoanSecondarySalesCost(loanSecondarySalesCost);
DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); if(StringUtils.isNotBlank(loanSecondarySalesApply.getValidityDate())){
Date date = new Date(); DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowtime = sdf.format(date);//当前时间 Date date = new Date();
String endtime = loanSecondarySalesApply.getValidityDate(); //到期时间 String nowtime = sdf.format(date);//当前时间
try { String endtime = loanSecondarySalesApply.getValidityDate(); //到期时间
if (sdf.parse(nowtime).getTime() > sdf.parse(endtime).getTime()) {//转成long类型比较 try {
loanSecondarySalesApplyDetailsVo.setValidate(false); if (sdf.parse(nowtime).getTime() > sdf.parse(endtime).getTime()) {//转成long类型比较
} else if (sdf.parse(nowtime).getTime() <= sdf.parse(endtime).getTime()) { loanSecondarySalesApplyDetailsVo.setValidate(false);
loanSecondarySalesApplyDetailsVo.setValidate(true); } else if (sdf.parse(nowtime).getTime() <= sdf.parse(endtime).getTime()) {
loanSecondarySalesApplyDetailsVo.setValidate(true);
}
} catch (ParseException e) {
e.printStackTrace();
} }
} catch (ParseException e) {
e.printStackTrace();
} }
} }
return rb.success().setData(loanSecondarySalesApplyDetailsVo); return rb.success().setData(loanSecondarySalesApplyDetailsVo);
} }

Loading…
Cancel
Save