添加默认否决操作处理

This commit is contained in:
gityjf 2021-04-16 09:03:50 +08:00
parent 49b767934d
commit e033bc46d3

View File

@ -1,18 +1,18 @@
package com.tenwa.lease.flow.contract.commbusiness;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.awe.util.SqlObject;
import com.amarsoft.awe.util.Transaction;
import com.amarsoft.context.ASUser;
import com.tenwa.flow.baseBussion.BaseBussiness;
import jbo.sys.FLOW_TASK;
import jbo.sys.LM_APPROVAL_OPINION_LOG;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import com.amarsoft.awe.util.SqlObject;
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;
/**
* 接口平台业务否决审批意见推送入表
*/
@ -20,9 +20,7 @@ public class GenerateRejectOpinionLog extends BaseBussiness{
public Object run(Transaction Sqlca) throws Exception{
this.initBussinessParam(Sqlca);
if(this.getAttribute("serial")==null)return "true";
String channel = this.getAttribute("channel").toString();
String applyType = this.getAttribute("ApplyType").toString();
String flowunid = this.getAttribute("FlowUnid").toString();
@ -34,27 +32,32 @@ public class GenerateRejectOpinionLog extends BaseBussiness{
//更新租赁物临时表状态
Sqlca.executeSQL(new SqlObject("update LB_EQUIPMENT_CAR_TEMP set IS_FLOW='N' where FLOWUNID='"+flowunid+"'"));
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();
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(false);
if(ftBoList.size()>0){
BizObject ftBo = ftBoList.get(0);
ASUser asUser=new ASUser(ftBo.getAttribute("inputuser").toString());
laolbo.setAttributeValue("APPROVE_OPINION",ftBo.getAttribute("phaseopinion"));
laolbo.setAttributeValue("APPROVE_BEGINTIME",ftBo.getAttribute("begintime"));
laolbo.setAttributeValue("APPROVE_ENDTIME",ftBo.getAttribute("endtime"));
laolbo.setAttributeValue("INPUTUSERID",asUser.getUserID());
laolbo.setAttributeValue("INPUTORGID",asUser.getOrgID());
}else{
laolbo.setAttributeValue("APPROVE_OPINION","·ñ¾ö");
laolbo.setAttributeValue("APPROVE_BEGINTIME", thisDate);
}
laolbo.setAttributeValue("CHANNEL",channel);
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","REJECT");
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");
}else if("BusinessChangeApply".equals(applyType)){//业务变更