|
|
@ -38,9 +38,7 @@ import org.springframework.stereotype.Component; |
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.text.ParseException; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Collections; |
|
|
|
import java.util.List; |
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
/** |
|
|
@ -166,12 +164,12 @@ public class ScheduledRepaymentPlanDetailsService { |
|
|
|
* 月初1号计提上个月资金占用费 |
|
|
|
* 1号1点 |
|
|
|
*/ |
|
|
|
// @Scheduled(cron = "0 0 1 1 * ?")
|
|
|
|
@Scheduled(cron = "0 0 17 ? * ? ") //每日下午5点
|
|
|
|
@Scheduled(cron = "0 0 1 1 * ?") |
|
|
|
public void pushFundVoucher() { |
|
|
|
List<String> useOrgSidList = loanRepaymentPlanDetailsService.selUseOrgSidListForFundVoucher(); |
|
|
|
useOrgSidList.removeAll(Collections.singleton(null)); |
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
|
|
|
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
|
if (!useOrgSidList.isEmpty()) { |
|
|
|
for (String u : useOrgSidList) { |
|
|
|
List<LoanPlanDetailsVoForFundVoucher> fundVouchers = loanRepaymentPlanDetailsService.getFundForVoucher(u); |
|
|
@ -190,7 +188,13 @@ public class ScheduledRepaymentPlanDetailsService { |
|
|
|
} |
|
|
|
GeneralVoucher.GeneralVoucherDetail voucherDetail1 = new GeneralVoucher.GeneralVoucherDetail(); |
|
|
|
voucherDetail1.setSceneCode("贷方"); |
|
|
|
voucherDetail1.setDataTime(new DateTime()); |
|
|
|
// Calendar calendar=Calendar.getInstance();
|
|
|
|
// calendar.setTime(new Date());
|
|
|
|
// //往前一天
|
|
|
|
// calendar.add(Calendar.DAY_OF_MONTH,-1);
|
|
|
|
// Date time = calendar.getTime();
|
|
|
|
// voucherDetail1.setDataTime(time);
|
|
|
|
voucherDetail1.setDataTime(new Date()); |
|
|
|
voucherDetail1.setAmount(result); |
|
|
|
voucherDetail1.setTimeFlag("0"); |
|
|
|
List<SysOrganizationVo> deptVo = sysOrganizationFeign.selectChildrenListBySid(u).getData(); |
|
|
|