From 8768664849a464676bbff0d5ea2fa7bc74c4d50c Mon Sep 17 00:00:00 2001 From: jianghongdong Date: Mon, 13 Aug 2018 17:35:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=90=88=E5=90=8C=E7=BB=93?= =?UTF-8?q?=E6=9D=9F=E6=97=B6=E5=85=A5=E9=A1=B9=E7=9B=AE=E8=BF=9B=E5=BA=A6?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E5=90=88=E5=90=8C=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../comm/util/jboutil/SaveBusinessStatus.java | 21 +++++++++++++++++++ .../quartz/ContractInfoForNomalEndSign.java | 9 +++++--- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src_core/com/tenwa/comm/util/jboutil/SaveBusinessStatus.java b/src_core/com/tenwa/comm/util/jboutil/SaveBusinessStatus.java index 9220c6bf7..b7a2aeae7 100644 --- a/src_core/com/tenwa/comm/util/jboutil/SaveBusinessStatus.java +++ b/src_core/com/tenwa/comm/util/jboutil/SaveBusinessStatus.java @@ -1,6 +1,7 @@ package com.tenwa.comm.util.jboutil; import jbo.com.tenwa.lease.carbrand.BUSINESS_STATUS; +import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO; import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO; import com.amarsoft.are.jbo.BizObject; @@ -38,4 +39,24 @@ public class SaveBusinessStatus { bsbo.setAttributeValue(BUSINESS_STATUS.inputtime, StringFunction.getTodayNow()); bsbom.saveObject(bsbo); } + /** + * @param contractId + * @param tx + * @param statusCode ״̬Âë + * @param userid + * @throws JBOException + */ + public static void saveByContractId(String contractId ,JBOTransaction tx ,String statusCode,String userid) throws JBOException{ + BizObject lcibo = JBOFactory.getBizObjectManager(LB_CONTRACT_INFO.CLASS_NAME).createQuery("ID=:ID").setParameter("ID", contractId).getSingleResult(false); + String cn = lcibo.getAttribute(LB_CONTRACT_INFO.CONTRACT_NUMBER).getString(); + ASUser user = new ASUser(userid); + BizObjectManager bsbom = JBOFactory.getBizObjectManager(BUSINESS_STATUS.CLASS_NAME, tx); + BizObject bsbo = bsbom.newObject(); + bsbo.setAttributeValue(BUSINESS_STATUS.contract_number, cn); + bsbo.setAttributeValue(BUSINESS_STATUS.business_status, statusCode); + bsbo.setAttributeValue(BUSINESS_STATUS.inputuserid, userid); + bsbo.setAttributeValue(BUSINESS_STATUS.inputorgid, user.getOrgID()); + bsbo.setAttributeValue(BUSINESS_STATUS.inputtime, StringFunction.getTodayNow()); + bsbom.saveObject(bsbo); + } } diff --git a/src_tenwa/quartz/ContractInfoForNomalEndSign.java b/src_tenwa/quartz/ContractInfoForNomalEndSign.java index 29def86d7..2cbff61ec 100644 --- a/src_tenwa/quartz/ContractInfoForNomalEndSign.java +++ b/src_tenwa/quartz/ContractInfoForNomalEndSign.java @@ -22,6 +22,8 @@ import com.base.util.QuartzUtil; //import com.tenwa.action.channelportal.ContractSignAction; //import com.tenwa.action.channelportal.comm.ContractTransferRightForEnd; import com.tenwa.comm.util.jboutil.DataOperatorUtil; +import com.tenwa.comm.util.jboutil.SaveBusinessStatus; +import com.tenwa.lease.app.quartzmession.JobInitUserName; import com.tenwa.officetempalte.action.CreateOfficeAction; //import com.tenwa.quartz.BeforeSerialTimingTask; //import com.tenwa.quartz.service.BeforeSerialTimingTaskService; @@ -31,13 +33,13 @@ import com.tenwa.reckon.util.UUIDUtil; import org.apache.log4j.Logger; public class ContractInfoForNomalEndSign implements Job{ - + private JobInitUserName jboName; @Override public void execute(JobExecutionContext arg0) throws JobExecutionException { String startime = StringFunction.getTodayNow(); try { JBOTransaction tx = JBOFactory.createJBOTransaction(); - ownershipTransferSign(tx); + ownershipTransferSign(tx,arg0); tx.commit(); QuartzUtil.insertLog(startime, "quartz.ContractInfoForNomalEndSign", "success", "³É¹¦"); } catch (Exception e) { @@ -94,7 +96,7 @@ public class ContractInfoForNomalEndSign implements Job{ // } // } // } - public void ownershipTransferSign(JBOTransaction tx ) throws Exception{ + public void ownershipTransferSign(JBOTransaction tx ,JobExecutionContext arg0) throws Exception{ // MakeContractInfo makeContract = new MakeContractInfo(); String conInfo1 = getContractId(tx); if(!(conInfo1 == null || conInfo1.length() <= 0)){ @@ -134,6 +136,7 @@ public class ContractInfoForNomalEndSign implements Job{ 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(); // } }