合同结束逻辑修改

This commit is contained in:
jianghongdong 2018-08-15 10:39:59 +08:00
parent 028a2726f0
commit 6cc9a10cf8

View File

@ -48,97 +48,16 @@ public class ContractInfoForNomalEndSign implements Job{
}
}
/*
*检索一天里面正常结束的合同并生成所有权转移证明并电子签章
*7个合同大概40s
* */
// public void ownershipTransferSign(JBOTransaction tx ) throws Exception{
// MakeContractInfo makeContract = new MakeContractInfo();
// String conInfo1 = makeContract.getContractId(tx);
// if(!(conInfo1 == null || conInfo1.length() <= 0)){
// String[] conInfos = conInfo1.split(",");
// ContractSignAction conSign=new ContractSignAction();
// for(String conInfo:conInfos){
// String customerName = conInfo.split("@")[1];
// String contractId = conInfo.split("@")[0];
// String businessStatus = conInfo.split("@")[2];
// //生成理赔关联附件
// Map<String,String> param = new HashMap<String,String>();
// param.put("contract_id", contractId);
// param.put("flow_unid", contractId);
// param.put("OBJECTTYPE", "产权转移单");
// param.put("NEW_TIME", StringFunction.getTodayNow());
// param.put("Flag", "true");//关联签约表
// param.put("Display", "true");
// param.put("ID", UUIDUtil.getUUID());//为了使用同一条Relative记录
// Transaction tran = Transaction.createTransaction("als");
// String templateParam = makeContract.initClaimsParams(param,tran,contractId);
// CreateOfficeAction coa = new CreateOfficeAction();
// makeContract.deleteAttrAndContractInfo(tx, contractId);
// if("37".equals(businessStatus)){
// //提前结清
// makeContract.createOfficeByTemplate(coa, templateParam, "所有权转移单","dc51c2a8661846528da47a03461e9f24" , customerName, null, tx);
// }else if("35".equals(businessStatus)){
// //保险理赔一辆车
// makeContract.createOfficeByTemplate(coa, templateParam, "所有权转移单(保险理赔)","efc6e5dfa79148ad84074d0203e6ed1d" , customerName, null, tx);
// }else {
// //正常结束
// makeContract.createOfficeByTemplate(coa, templateParam, "所有权转移单","041df2e804c54f8a8955457d586e8980" , customerName, null, tx);
// }
// //电子签约
// String sReturn = conSign.transferSign(tx, contractId);
// if("success".equals(sReturn)){
// //如果签约成功将合同状态改为105结束
// ContractTransferRightForEnd ctrf = new ContractTransferRightForEnd();
// ctrf.setContract_id(contractId);
// ctrf.updateContractStatues(tx);
// }
// }
// }
// }
public void ownershipTransferSign(JBOTransaction tx ,JobExecutionContext arg0) throws Exception{
// MakeContractInfo makeContract = new MakeContractInfo();
String conInfo1 = getContractId(tx);
if(!(conInfo1 == null || conInfo1.length() <= 0)){
String[] conInfos = conInfo1.split(",");
// ContractSignAction conSign=new ContractSignAction();
for(String conInfo:conInfos){
String customerName = conInfo.split("@")[1];
String contractId = conInfo.split("@")[0];
String businessStatus = conInfo.split("@")[2];
//生成理赔关联附件
// Map<String,String> param = new HashMap<String,String>();
// param.put("contract_id", contractId);
// param.put("flow_unid", contractId);
// param.put("OBJECTTYPE", "产权转移单");
// param.put("NEW_TIME", StringFunction.getTodayNow());
// param.put("Flag", "true");//关联签约表
// param.put("Display", "true");
// param.put("CUSTOMER_NAME", customerName);
// param.put("ID", UUIDUtil.getUUID());//为了使用同一条Relative记录
// String templateParam = initClaimsParams(param,tx,contractId);
// CreateOfficeAction coa = new CreateOfficeAction();
// deleteAttrAndContractInfo(tx, contractId);
// if("37".equals(businessStatus)){
// //提前结清
// makeContract.createOfficeByTemplate(coa, templateParam, "所有权转移单","dc51c2a8661846528da47a03461e9f24" , customerName, null, tx);
// }else if("35".equals(businessStatus)){
// //保险理赔一辆车
// makeContract.createOfficeByTemplate(coa, templateParam, "所有权转移单(保险理赔)","efc6e5dfa79148ad84074d0203e6ed1d" , customerName, null, tx);
// }else {
// //正常结束
// createOfficeByTemplate(coa, templateParam, "所有权转移单","041df2e804c54f8a8955457d586e8980" , customerName, null, tx);
// }
//电子签约
// String sReturn = conSign.transferSign(tx, contractId);
// if("success".equals(sReturn)){
//如果签约成功将合同状态改为105结束
Transaction tran = Transaction.createTransaction("als");
BizObjectManager bm = JBOFactory.getBizObjectManager(LB_CONTRACT_INFO.CLASS_NAME, tran);
bm.createQuery("update O set contract_status = '105' where id = '"+contractId+"'").executeUpdate();
SaveBusinessStatus.saveByContractId(contractId, tx, "61", jboName.getUserId(arg0, tx));
tran.commit();
// }
// String customerName = conInfo.split("@")[1];
String contractId = conInfo.split("@")[0];
BizObjectManager bm = JBOFactory.getBizObjectManager(LB_CONTRACT_INFO.CLASS_NAME, tx);
bm.createQuery("update O set contract_status = '105' where id = '"+contractId+"'").executeUpdate();
SaveBusinessStatus.saveByContractId(contractId, tx, "61", jboName.getUserId(arg0, tx));
}
}
}
@ -170,8 +89,8 @@ public class ContractInfoForNomalEndSign implements Job{
String conInfos = new String();
for(BizObject bo : boList){
conInfos += bo.getAttribute("id")+"@";
conInfos += bo.getAttribute("customername")+"@";
conInfos += bo.getAttribute("BUSINESS_STATUS")+",";
conInfos += bo.getAttribute("customername")+",";
// conInfos += bo.getAttribute("BUSINESS_STATUS")+",";
}
return conInfos;
}