1.罚息减免定时任务修改(防止重复撤销)

This commit is contained in:
zhangbb 2020-08-19 09:57:12 +08:00
parent bee74e60c2
commit 9332f5e0b3

View File

@ -32,9 +32,9 @@ public class ReductionPenaltyRemove implements Job{
tx = JBOFactory.createJBOTransaction();
BizObject dateNoBo= JBOFactory.getBizObjectManager(CONFIGURATE.CLASS_NAME, tx).createQuery("attr_id='罚息减免申请自动取消' and field1='汽车'").getSingleResult(false);
String dateNo =dateNoBo.getAttribute("ATTR_VALUE").toString();
String SQL = "settle_method='settlemethod12' AND v.DATEDIFF(v.SYSDATE(),v.STR_TO_DATE(inputtime,'%Y/%m/%d'))>='"+dateNo+"'";
String SQL = "settle_method='settlemethod12' and ROLL_BACK='0' AND v.DATEDIFF(v.SYSDATE(),v.STR_TO_DATE(inputtime,'%Y/%m/%d'))>='"+dateNo+"'";
BizObjectManager bomLri = JBOFactory.getBizObjectManager(LC_RENT_INCOME.CLASS_NAME,tx);
List<BizObject> lriBoList = bomLri.createQuery(SQL).getResultList(false);
List<BizObject> lriBoList = bomLri.createQuery(SQL).getResultList(true);
for(BizObject lriBo:lriBoList){
String planId = lriBo.getAttribute("plan_id").toString();
BizObject clrpBo= JBOFactory.getBizObjectManager(VI_LC_RENT_PLAN.CLASS_NAME, tx).createQuery("id=:id and (rent_over>0 or penalty_over>0)").setParameter("id", planId).getSingleResult(false);
@ -60,7 +60,7 @@ public class ReductionPenaltyRemove implements Job{
boLRi.setAttributeValue("PENALTY_ADJUST", "-"+lriBo.getAttribute("PENALTY_ADJUST").toString());
boLRi.setAttributeValue("SETTLE_METHOD", lriBo.getAttribute("SETTLE_METHOD").toString());
boLRi.setAttributeValue("MEMO", "超期未还款,罚息减免撤销");
boLRi.setAttributeValue("ROLL_BACK", lriBo.getAttribute("ROLL_BACK").toString());
boLRi.setAttributeValue("ROLL_BACK", "1");
boLRi.setAttributeValue("INPUTUSERID", "8009U00000002");
boLRi.setAttributeValue("INPUTORGID", "8009001");
boLRi.setAttributeValue("INPUTTIME", StringFunction.getTodayNow());
@ -68,6 +68,9 @@ public class ReductionPenaltyRemove implements Job{
boLRi.setAttributeValue("UPDATEORGID", "8009001");
boLRi.setAttributeValue("UPDATETIME", StringFunction.getTodayNow());
bomLri.saveObject(boLRi);
//更新红冲状态
lriBo.setAttributeValue("ROLL_BACK", "1");
bomLri.saveObject(lriBo);
}
}
} catch (JBOException e) {