添加合同结束时入项目进度日志合同关闭
This commit is contained in:
parent
bce047bcba
commit
8768664849
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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();
|
||||
// }
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user