|
|
@ -28,6 +28,8 @@ import com.yxt.anrui.flowable.api.flowtask.FlowTaskVo; |
|
|
|
import com.yxt.anrui.flowable.api.flowtask.LatestTaskVo; |
|
|
|
import com.yxt.anrui.flowable.api.utils.ProcDefEnum; |
|
|
|
import com.yxt.anrui.flowable.sqloperationsymbol.BusinessVariables; |
|
|
|
import com.yxt.anrui.portal.api.dictcommon.DictCommonFeign; |
|
|
|
import com.yxt.anrui.portal.api.dictcommon.DictCommonVo; |
|
|
|
import com.yxt.anrui.portal.api.flow.PCHistTaskListAndCommentList; |
|
|
|
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign; |
|
|
|
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo; |
|
|
@ -128,7 +130,8 @@ public class LoanMonthlyAccrualApplyService extends MybatisBaseService<LoanMonth |
|
|
|
private LoanRepaymentScheduleService loanRepaymentScheduleService; |
|
|
|
@Autowired |
|
|
|
private FinTempTimePushFeign finTempTimePushFeign; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private DictCommonFeign dictCommonFeign; |
|
|
|
public ResultBean<LoanMonthlyAccrualApplyInit> accrualInit(String orgPath) { |
|
|
|
ResultBean<LoanMonthlyAccrualApplyInit> rb = ResultBean.fireFail(); |
|
|
|
String orgSidPath = orgPath; |
|
|
@ -671,10 +674,18 @@ public class LoanMonthlyAccrualApplyService extends MybatisBaseService<LoanMonth |
|
|
|
private void pushAccrualVoucher(String businessSid) { |
|
|
|
LoanMonthlyAccrualApply apply = fetchBySid(businessSid); |
|
|
|
List<LoanMonthlyAccrualRecord> records = loanMonthlyAccrualRecordService.selByMainSid(businessSid); |
|
|
|
int index = 0; |
|
|
|
int indexFinal = 0; |
|
|
|
if (!records.isEmpty()) { |
|
|
|
int index = 1000; |
|
|
|
for (int i = 0; i < records.size(); i += 1000) { |
|
|
|
if (i + 1000 > records.size()) { |
|
|
|
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey("WithholdMax", "月还计提").getData(); |
|
|
|
if (null != dictCommonVo) { |
|
|
|
String dictValue = dictCommonVo.getDictValue(); |
|
|
|
int i = Integer.parseInt(dictValue); |
|
|
|
index = i; |
|
|
|
indexFinal = i; |
|
|
|
} |
|
|
|
for (int i = 0; i < records.size(); i += indexFinal) { |
|
|
|
if (i + indexFinal > records.size()) { |
|
|
|
index = records.size() - i; |
|
|
|
} |
|
|
|
List<LoanMonthlyAccrualRecord> newList = records.subList(i, i + index); |
|
|
|