测试修改

This commit is contained in:
gityjf 2020-08-06 14:05:16 +08:00
parent 73bab17251
commit 98d79d1adc

View File

@ -1289,17 +1289,17 @@ public class CollectAuditInfoCache {
}
Map<String, String> map = getRetAndCodeByBatch(strResp);
if (map.containsKey("RET_CODE")) {//清空批量代收状态
//清空批量处理状态
JBOTransaction trans = JBOFactory.createJBOTransaction();
BizObjectManager bm = JBOFactory.getFactory().getManager(LC_RENT_PLAN.CLASS_NAME,trans);
for (BizObject biz : list) {
//清空批量处理状态
JBOTransaction trans = JBOFactory.createJBOTransaction();
BizObjectManager bm = JBOFactory.getFactory().getManager(LC_RENT_PLAN.CLASS_NAME,trans);
bm.createQuery("update O set O.BATCH_STATUS=:BATCH_STATUS,O.BATCH_NO=:BATCH_NO,O.BATCH_SN=:BATCH_SN where O.id=:id")
.setParameter("BATCH_STATUS", "")//处理中
.setParameter("BATCH_NO", req_sn)
.setParameter("BATCH_SN", "")
.setParameter("id", biz.getAttribute("id").toString()).executeUpdate();
trans.commit();
}
trans.commit();
}else{
int m = 0;//统计发送的代收的批数
for (int n = 1; n <= map.size(); n++) {
@ -1307,36 +1307,25 @@ public class CollectAuditInfoCache {
m++;
}
}
JBOTransaction trans = JBOFactory.createJBOTransaction();
BizObjectManager bm = JBOFactory.getFactory().getManager(LC_RENT_PLAN.CLASS_NAME,trans);
for (int k = 1; k <= m; k++) {
if (map.containsKey("REQ_SN") && map.containsKey("RET_CODE"+k) && "0000".equals(map.get("RET_CODE"+k))) {
JBOTransaction trans = JBOFactory.createJBOTransaction();
BizObjectManager bm = JBOFactory.getFactory().getManager(LC_RENT_PLAN.CLASS_NAME,trans);
BizObject bo0 = bm.createQuery("O.BATCH_NO=:BATCH_NO and O.BATCH_SN like '%"+map.get("SN"+k)+"%'").setParameter("BATCH_NO", map.get("REQ_SN")).getSingleResult(false);
if (bo0 != null && "process".equals(bo0.getAttribute("BATCH_STATUS"))) {
bm.createQuery("update O set O.BATCH_STATUS=:BATCH_STATUS where O.BATCH_NO=:BATCH_NO and O.BATCH_SN like '%"+map.get("SN"+k)+"%' ")
bm.createQuery("update O set O.BATCH_STATUS=:BATCH_STATUS where O.BATCH_NO=:BATCH_NO and O.BATCH_SN like '%"+map.get("SN"+k)+"%' ")
.setParameter("BATCH_STATUS", "process")//处理状态标记为--处理中
.setParameter("BATCH_NO", map.get("REQ_SN")).executeUpdate();
trans.commit();
}else{
bm.createQuery("update O set O.BATCH_STATUS=:BATCH_STATUS where O.BATCH_NO=:BATCH_NO and O.BATCH_SN like '%"+map.get("SN"+k)+"%' ")
.setParameter("BATCH_STATUS", "process")//处理状态标记为--处理中
.setParameter("BATCH_NO", map.get("REQ_SN")).executeUpdate();
trans.commit();
}
}else{
JBOTransaction trans = JBOFactory.createJBOTransaction();
BizObjectManager bm = JBOFactory.getFactory().getManager(LC_RENT_PLAN.CLASS_NAME,trans);
BizObject bo0 = bm.createQuery("O.BATCH_NO=:BATCH_NO and O.BATCH_SN like '%"+map.get("SN"+k)+"%'").setParameter("BATCH_NO", map.get("REQ_SN")).getSingleResult(false);
if (bo0 != null && "process".equals(bo0.getAttribute("BATCH_STATUS"))) {
//不做任何操作
}else{
bm.createQuery("update O set O.BATCH_STATUS=:BATCH_STATUS,O.BATCH_NO='',O.BATCH_SN='' where O.BATCH_NO=:BATCH_NO and O.BATCH_SN like '%"+map.get("SN"+k)+"%' ")
.setParameter("BATCH_STATUS", "")//清空批量处理状态
.setParameter("BATCH_NO", map.get("REQ_SN")).executeUpdate();
trans.commit();
.setParameter("BATCH_STATUS", "")//清空批量处理状态
.setParameter("BATCH_NO", map.get("REQ_SN")).executeUpdate();
}
}
}
trans.commit();
}
return map;
}