diff --git a/src_tenwa/com/tenwa/lease/app/quartzmession/DistributorMarginCompensation.java b/src_tenwa/com/tenwa/lease/app/quartzmession/DistributorMarginCompensation.java index 5510890f9..a8124125c 100644 --- a/src_tenwa/com/tenwa/lease/app/quartzmession/DistributorMarginCompensation.java +++ b/src_tenwa/com/tenwa/lease/app/quartzmession/DistributorMarginCompensation.java @@ -43,12 +43,13 @@ public class DistributorMarginCompensation implements Job { for(BizObject bo_lac : bo_lacs){ String distributor_no = bo_lac.getAttribute("distributor_no").toString(); //获得代偿日期 - int days_Number = bo_lac.getAttribute("days_Number").getInt(); + int days_Number =0 - bo_lac.getAttribute("days_Number").getInt(); Date dt = sdf.parse(plan_date); Calendar cal = Calendar.getInstance(); cal.add(Calendar.DAY_OF_YEAR, days_Number); - long dt_add = dt.getTime(); + Date dt_add = cal.getTime(); String repay_date = sdf.format(dt_add); + System.out.println("代偿日期为:"+repay_date); List bos = JBOFactory.getBizObjectManager(VI_LC_AUDIT_RENT_PLAN.CLASS_NAME, tx).createQuery("O.COLLECT_STATUS IN ('未收款', '部分收款') and O.PLAN_DATE <= '"+repay_date+"' and ( O.BATCH_STATUS<>'process' or o.BATCH_STATUS IS NULL ) and O.DISTRIBUTOR_ID='"+distributor_no+"'").getResultList(false); if(bos.size()==0){