业务取消

This commit is contained in:
liuzhao 2018-10-12 10:18:30 +08:00
parent b2231f49b8
commit 997d83adad
2 changed files with 45 additions and 1 deletions

View File

@ -102,7 +102,7 @@ public class BusinessCancelJob implements Job {
lcibo.setAttributeValue(LB_CANCLE_INFO.PROJECT_ID,map.get("ID"));
// lcibo.setAttributeValue(LB_CANCLE_INFO.CANCLE_TYPE,"");
lcibom.saveObject(lcibo);
SaveBusinessStatus.saveByProjectId(map.get("ID"), tx, "62", jboName.getUserId(arg0, tx));
SaveBusinessStatus.saveByProjectId(map.get("ID"), tx, "5", jboName.getUserId(arg0, tx));
}
}
}

View File

@ -0,0 +1,44 @@
package com.tenwa.lease.flow.contract.commbusiness;
import jbo.com.tenwa.lease.carbrand.BUSINESS_STATUS;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.are.util.StringFunction;
import com.amarsoft.awe.util.Transaction;
import com.amarsoft.context.ASUser;
import com.tenwa.flow.baseBussion.BaseBussiness;
public class LBProjectApplyCancel extends BaseBussiness{
String project_no = "";
@Override
public Object run(Transaction Sqlca) throws Exception {
this.initBussinessParam(Sqlca);
ASUser asUser=new ASUser(this.getAttribute("CurUserID").toString());
project_no = this.getAttribute("FlowKey")==null? "":this.getAttribute("FlowKey").toString();
this.saveBusinessStatus(Sqlca,asUser);
String sMessage="true";
return sMessage;
}
private void saveBusinessStatus(Transaction Sqlca,ASUser asUser) throws Exception{
JBOTransaction tx = null;
tx= JBOFactory.createJBOTransaction();
BizObjectManager bsbom = JBOFactory.getBizObjectManager(BUSINESS_STATUS.CLASS_NAME,tx);
BizObject bsbo = bsbom.newObject();
try {
bsbo.setAttributeValue(BUSINESS_STATUS.contract_number,project_no);
bsbo.setAttributeValue(BUSINESS_STATUS.business_status,"5");//5 È¡Ïû
bsbo.setAttributeValue(BUSINESS_STATUS.inputuserid,asUser.getUserID());
bsbo.setAttributeValue(BUSINESS_STATUS.inputtime,StringFunction.getTodayNow());
bsbo.setAttributeValue(BUSINESS_STATUS.inputorgid,asUser.getOrgID());
bsbom.saveObject(bsbo);
tx.commit();
}catch (Exception e){
tx.rollback();
e.printStackTrace();
}
}
}