修改扣款卡姓名修改不保存问题

This commit is contained in:
zhangjun 2020-08-05 18:16:33 +08:00
parent 1bdb4917af
commit df42224d4c

View File

@ -259,8 +259,12 @@ public class FlowDataServiceImpl implements FlowDataService{
}else{
BizObjectManager cahManage = JBOFactory.getFactory().getManager(CUSTOMER_ACCOUNT_HIS.CLASS_NAME);
BizObjectManager caManage = JBOFactory.getFactory().getManager(CUSTOMER_ACCOUNT.CLASS_NAME,tx);
BizObject ca = caManage.createQuery(" project_id=:project_id ").setParameter("project_id", projectId).getSingleResult(true);
if( ca!=null && "Y".equals(ca.getAttribute("sign_status")==null?"":ca.getAttribute("sign_status").toString())){
BizObject ca = caManage.createQuery(" acc_type='Debit' and project_id=:project_id ").setParameter("project_id", projectId).getSingleResult(true);
if(ca==null){
ca = caManage.newObject();
BizObject lul = JBOFactory.getFactory().getManager(LB_UNION_LESSEE.CLASS_NAME).createQuery(" project_id=:project_id ").setParameter("project_id", projectId).getSingleResult(false);
ca.setAttributeValue("customerid", lul.getAttribute("customer_id").getString());
}else if(ca!=null && "Y".equals(ca.getAttribute("sign_status")==null?"":ca.getAttribute("sign_status").toString())){
BizObject cah = cahManage.createQuery(" account=:account and acc_number=:acc_number and bank_name=:bank_name and mobile=:mobile ")
.setParameter("account", ca.getAttribute("account").toString()).setParameter("acc_number", ca.getAttribute("acc_number").toString()).setParameter("bank_name", ca.getAttribute("bank_name").toString()).setParameter("mobile", ca.getAttribute("mobile").toString()).getSingleResult(false);
if(cah == null ){
@ -268,10 +272,6 @@ public class FlowDataServiceImpl implements FlowDataService{
signFromCondtion.put("PROJECT_ID",projectId);
DataOperatorUtil.copyJBOSet(CUSTOMER_ACCOUNT.CLASS_NAME, signFromCondtion,CUSTOMER_ACCOUNT_HIS.CLASS_NAME, null, null,null, tx);
}
}else{
ca = caManage.newObject();
BizObject lul = JBOFactory.getFactory().getManager(LB_UNION_LESSEE.CLASS_NAME).createQuery(" project_id=:project_id ").setParameter("project_id", projectId).getSingleResult(false);
ca.setAttributeValue("customerid", lul.getAttribute("customer_id").getString());
}
ca.setAttributeValue("acc_number", acc_number);
ca.setAttributeValue("bank_name", bank_name);