|
|
@ -98,6 +98,13 @@ public class LoanMonthlyAccrualApplyService extends MybatisBaseService<LoanMonth |
|
|
|
|
|
|
|
public ResultBean<LoanMonthlyAccrualApplyInit> accrualInit(String orgPath) { |
|
|
|
ResultBean<LoanMonthlyAccrualApplyInit> rb = ResultBean.fireFail(); |
|
|
|
String orgSidPath = orgPath; |
|
|
|
orgSidPath = orgSidPath + "/"; |
|
|
|
int i1 = orgSidPath.indexOf("/"); |
|
|
|
int i2 = orgSidPath.indexOf("/", i1 + 1); |
|
|
|
int i3 = orgSidPath.indexOf("/", i2 + 1); |
|
|
|
int i4 = orgSidPath.indexOf("/", i3 + 1); |
|
|
|
orgSidPath = orgSidPath.substring(0, i3); |
|
|
|
LoanMonthlyAccrualApplyInit vo = new LoanMonthlyAccrualApplyInit(); |
|
|
|
vo.setOrgPath(orgPath); |
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
@ -111,6 +118,7 @@ public class LoanMonthlyAccrualApplyService extends MybatisBaseService<LoanMonth |
|
|
|
); |
|
|
|
qw.eq("isDelete", 0); |
|
|
|
qw.ne("nodeState", "终止"); |
|
|
|
qw.like("orgSidPath", orgSidPath); |
|
|
|
List<LoanMonthlyAccrualApply> list = baseMapper.selByNewDate(qw); |
|
|
|
if (!list.isEmpty()) { |
|
|
|
return rb.setMsg("当月已经发起过月还计提,请勿重复发起!"); |
|
|
@ -118,13 +126,6 @@ public class LoanMonthlyAccrualApplyService extends MybatisBaseService<LoanMonth |
|
|
|
List<LoanMonthlyPlanRecord> records = new ArrayList<>(); |
|
|
|
QueryWrapper<LoanRepaymentPlanDetails> queryWrapper = new QueryWrapper<>(); |
|
|
|
//=======================
|
|
|
|
String orgSidPath = orgPath; |
|
|
|
orgSidPath = orgSidPath + "/"; |
|
|
|
int i1 = orgSidPath.indexOf("/"); |
|
|
|
int i2 = orgSidPath.indexOf("/", i1 + 1); |
|
|
|
int i3 = orgSidPath.indexOf("/", i2 + 1); |
|
|
|
int i4 = orgSidPath.indexOf("/", i3 + 1); |
|
|
|
orgSidPath = orgSidPath.substring(0, i3); |
|
|
|
queryWrapper.like("orgSidPath", orgSidPath); |
|
|
|
queryWrapper.apply(StringUtils.isNotEmpty(head), "date_format (dueDate,'%Y-%m-%d') >= date_format('" + head + "','%Y-%m-%d')"). |
|
|
|
apply(StringUtils.isNotEmpty(last), "date_format (dueDate,'%Y-%m-%d') <= date_format('" + last + "','%Y-%m-%d')" |
|
|
@ -137,6 +138,9 @@ public class LoanMonthlyAccrualApplyService extends MybatisBaseService<LoanMonth |
|
|
|
if (StringUtils.isNotBlank(details.getLoanContractNo())) { |
|
|
|
record.setLoanContractNo(details.getLoanContractNo()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(details.getCustomer())) { |
|
|
|
record.setCustomer(details.getCustomer()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(details.getVinNo())) { |
|
|
|
record.setVinNo(details.getVinNo()); |
|
|
|
} |
|
|
@ -226,6 +230,11 @@ public class LoanMonthlyAccrualApplyService extends MybatisBaseService<LoanMonth |
|
|
|
qw.apply(StringUtils.isNotEmpty(applyStartTime), "date_format (applyDate,'%Y-%m-%d') >= date_format('" + applyStartTime + "','%Y-%m-%d')"). |
|
|
|
apply(StringUtils.isNotEmpty(applyEndTime), "date_format (applyDate,'%Y-%m-%d') <= date_format('" + applyEndTime + "','%Y-%m-%d')" |
|
|
|
); |
|
|
|
String closingStartDate = pagerQuery.getClosingStartDate(); |
|
|
|
String closingEndDate = pagerQuery.getClosingEndDate(); |
|
|
|
qw.apply(StringUtils.isNotEmpty(closingStartDate), "date_format (closingDate,'%Y-%m-%d') >= date_format('" + closingStartDate + "','%Y-%m-%d')"). |
|
|
|
apply(StringUtils.isNotEmpty(closingEndDate), "date_format (closingDate,'%Y-%m-%d') <= date_format('" + closingEndDate + "','%Y-%m-%d')" |
|
|
|
); |
|
|
|
qw.eq("isDelete", 0); |
|
|
|
qw.orderByDesc("createTime"); |
|
|
|
IPage<LoanMonthlyAccrualApplyVo> pagging = baseMapper.listPage(page, qw); |
|
|
@ -369,6 +378,9 @@ public class LoanMonthlyAccrualApplyService extends MybatisBaseService<LoanMonth |
|
|
|
if (StringUtils.isNotBlank(details.getLoanContractNo())) { |
|
|
|
record.setLoanContractNo(details.getLoanContractNo()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(details.getCustomer())) { |
|
|
|
record.setCustomer(details.getCustomer()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(details.getVinNo())) { |
|
|
|
record.setVinNo(details.getVinNo()); |
|
|
|
} |
|
|
|