接口平台业务申请通过
This commit is contained in:
parent
8573465b2b
commit
3f6cc07dc6
@ -0,0 +1,60 @@
|
||||
package com.tenwa.lease.flow.contract.commbusiness;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import jbo.sys.FLOW_TASK;
|
||||
import jbo.sys.LM_APPROVAL_OPINION_LOG;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.amarsoft.context.ASUser;
|
||||
import com.tenwa.flow.baseBussion.BaseBussiness;
|
||||
/**
|
||||
* 接口平台业务通过审批意见推送入表
|
||||
*/
|
||||
public class GeneratePassOpinionLog extends BaseBussiness{
|
||||
|
||||
public Object run(Transaction Sqlca) throws Exception{
|
||||
this.initBussinessParam(Sqlca);
|
||||
|
||||
if(this.getAttribute("serial")==null)return "true";
|
||||
|
||||
String applyType = this.getAttribute("ApplyType").toString();
|
||||
String flowunid = this.getAttribute("FlowUnid").toString();
|
||||
String projectNo = this.getAttribute("ProjectNo").toString();
|
||||
String applicationNo = this.getAttribute("applicationNo").toString();
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
|
||||
String thisDate = dateFormat.format(new Date());
|
||||
|
||||
BizObjectManager ftBm = JBOFactory.getBizObjectManager(FLOW_TASK.CLASS_NAME,Sqlca);
|
||||
List<BizObject> ftBoList = ftBm.createQuery(" select O.begintime,O.endtime,fo.phaseopinion,fo.inputuser from O,jbo.sys.FLOW_OPINION fo where O.SERIALNO=fo.serialno and O.OBJECTNO=:OBJECTNO ORDER BY O.endtime DESC ").setParameter("OBJECTNO",flowunid).getResultList(true);
|
||||
BizObject ftBo = ftBoList.get(0);
|
||||
ASUser asUser=new ASUser(ftBo.getAttribute("inputuser").toString());
|
||||
|
||||
BizObjectManager laolBm = JBOFactory.getBizObjectManager(LM_APPROVAL_OPINION_LOG.CLASS_NAME,Sqlca);
|
||||
BizObject laolbo = laolBm.newObject();
|
||||
|
||||
laolbo.setAttributeValue("APPLICATION_NO",applicationNo);
|
||||
laolbo.setAttributeValue("PROJECT_NO",projectNo);
|
||||
laolbo.setAttributeValue("FLOWUNID",flowunid);
|
||||
laolbo.setAttributeValue("ITEMNO",applyType);
|
||||
laolbo.setAttributeValue("APPROVE_OPINION",ftBo.getAttribute("phaseopinion"));
|
||||
laolbo.setAttributeValue("APPROVE_STATUS","PASS");
|
||||
laolbo.setAttributeValue("APPROVE_BEGINTIME",ftBo.getAttribute("begintime"));
|
||||
laolbo.setAttributeValue("APPROVE_ENDTIME",ftBo.getAttribute("endtime"));
|
||||
laolbo.setAttributeValue("PUSH_NUMBER","0");
|
||||
laolbo.setAttributeValue("INPUTTIME",thisDate);
|
||||
laolbo.setAttributeValue("INPUTUSERID",asUser.getUserID());
|
||||
laolbo.setAttributeValue("INPUTORGID",asUser.getOrgID());
|
||||
if("BusinessApplyApply".equals(applyType)){
|
||||
laolbo.setAttributeValue("PROCESS_NODE","BUSINESS_EXAMINE");
|
||||
}
|
||||
laolBm.saveObject(laolbo);
|
||||
|
||||
return "true";
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user