package com.tenwa.apzl.comm; import java.util.HashMap; import java.util.Map; import jbo.app.LB_EQUIPMENT_CAR; import jbo.com.tenwa.lease.comm.LB_CAR_LICENSE_PLATE_INFO; import jbo.com.tenwa.lease.comm.LB_CAR_LICENSE_PLATE_INFO_TEMP; 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.tenwa.comm.util.jboutil.DataOperatorUtil; import com.tenwa.flow.baseBussion.BaseBussiness; public class CopyLbCarLicensePlateToTemp extends BaseBussiness{ @Override public Object run(Transaction Sqlca) throws Exception { this.initBussinessParam(Sqlca); String contract_id = this.getAttribute("ContractId").toString(); String flowunid = this.getAttribute("ObjectNo").toString(); /*BizObjectManager carLicensePlateManager = JBOFactory.getBizObjectManager(LB_CAR_LICENSE_PLATE_INFO.CLASS_NAME, Sqlca); BizObject carLicensePlate = carLicensePlateManager.createQuery("contract_id=:contract_id").setParameter("contract_id", contract_id).getSingleResult(true); if(carLicensePlate !=null){ BizObject lbEquipmentCar = JBOFactory.createBizObjectQuery(LB_EQUIPMENT_CAR.CLASS_NAME, "select frame_number from o where contract_id=:contract_id").setParameter("contract_id", contract_id).getSingleResult(false); String frame_number = lbEquipmentCar.getAttribute("frame_number").toString(); carLicensePlate.setAttributeValue("frame_number", frame_number); carLicensePlateManager.saveObject(carLicensePlate); }*/ Map fromCondtion = new HashMap(); fromCondtion.put("contract_id", contract_id); Map otherProperty = new HashMap(); otherProperty.put("FLOWUNID", flowunid); DataOperatorUtil.copySingleJBO(LB_CAR_LICENSE_PLATE_INFO.CLASS_NAME, fromCondtion, LB_CAR_LICENSE_PLATE_INFO_TEMP.CLASS_NAME, null, otherProperty, Sqlca); return "true"; } }