diff --git a/WebContent/WEB-INF/etc/jbo/jbo_lease.xml b/WebContent/WEB-INF/etc/jbo/jbo_lease.xml
index be01ebcfd..53158e6dc 100644
--- a/WebContent/WEB-INF/etc/jbo/jbo_lease.xml
+++ b/WebContent/WEB-INF/etc/jbo/jbo_lease.xml
@@ -1511,6 +1511,7 @@
+
@@ -3677,6 +3678,7 @@
+
diff --git a/src_jbo/jbo/app/LB_EQUIPMENT_CAR.java b/src_jbo/jbo/app/LB_EQUIPMENT_CAR.java
index e734a541e..7be55deec 100644
--- a/src_jbo/jbo/app/LB_EQUIPMENT_CAR.java
+++ b/src_jbo/jbo/app/LB_EQUIPMENT_CAR.java
@@ -469,4 +469,8 @@ public interface LB_EQUIPMENT_CAR{
* ʶ STRING(32)
*/
public static final String uu_id = "uu_id";
+ /**
+ * ʶǷ STRING(32)
+ */
+ public static final String TERMINATE_TYPE = "TERMINATE_TYPE";
}
\ No newline at end of file
diff --git a/src_jbo/jbo/com/tenwa/lease/comm/LB_EQUIPMENT_CAR_TEMP.java b/src_jbo/jbo/com/tenwa/lease/comm/LB_EQUIPMENT_CAR_TEMP.java
index f99908653..26bbe222d 100644
--- a/src_jbo/jbo/com/tenwa/lease/comm/LB_EQUIPMENT_CAR_TEMP.java
+++ b/src_jbo/jbo/com/tenwa/lease/comm/LB_EQUIPMENT_CAR_TEMP.java
@@ -457,4 +457,8 @@ public interface LB_EQUIPMENT_CAR_TEMP{
* ʶ STRING(32)
*/
public static final String uu_id = "uu_id";
+ /**
+ * ʶǷ STRING(32)
+ */
+ public static final String TERMINATE_TYPE = "TERMINATE_TYPE";
}
\ No newline at end of file
diff --git a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBEquipmentTempToFormalBusiness.java b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBEquipmentTempToFormalBusiness.java
index 826d3afc3..651f08819 100644
--- a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBEquipmentTempToFormalBusiness.java
+++ b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBEquipmentTempToFormalBusiness.java
@@ -1,13 +1,22 @@
package com.tenwa.lease.flow.project.commbusiness;
+import java.util.List;
import java.util.Map;
+
+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.tenwa.comm.util.jboutil.DataOperatorUtil;
import com.tenwa.flow.baseBussion.BaseBussiness;
import com.tenwa.lease.flow.comm.service.LeaseFlowBaseService;
import com.tenwa.lease.flow.comm.service.ServiceOperatorEnum;
import com.tenwa.lease.flow.comm.serviceImp.LeaseFlowBaseServiceImp;
+import jbo.com.tenwa.lease.comm.LB_EQUIPMENT_CAR;
+import jbo.com.tenwa.lease.comm.LB_EQUIPMENT_CAR_TEMP;
+
public class LBEquipmentTempToFormalBusiness extends BaseBussiness {
@Override
@@ -15,17 +24,30 @@ public class LBEquipmentTempToFormalBusiness extends BaseBussiness {
this.initBussinessParam(Sqlca);
String flowname=(String)this.getAttribute("FlowName");
String flowunid=(String)this.getAttribute("FlowUnid");
+ String settletype= this.getAttribute("settletype") == null ? "" : this.getAttribute("settletype").toString();
LeaseFlowBaseService service=new LeaseFlowBaseServiceImp();
MapfromCondtion=this.getDefaultTempToFormalFromCondtion();
MaptoCondtion=this.getDefaultTempToFormalToCondtion();
MapotherProperty=this.getDefaultOtherProperty();
+
if("ͬ".equals(flowname)){
otherProperty.put("status", "0010");
- }else if("ǰ".equals(flowname)) {
- Sqlca.executeSQL(new SqlObject("update LB_EQUIPMENT_CAR_TEMP set TERMINATE_TYPE='2' where TERMINATE_TYPE = '3' and FLOWUNID='"+flowunid+"'"));
+ }
+ if("ǰ".equals(flowname) && "Y".equals(settletype) ) {
+// Sqlca.executeSQL(new SqlObject("update LB_EQUIPMENT_CAR_TEMP set TERMINATE_TYPE='2' where TERMINATE_TYPE = '3' and FLOWUNID='"+flowunid+"'"));
+ fromCondtion.put("TERMINATE_TYPE", "3");
+ otherProperty.put("TERMINATE_TYPE", "2");
+ BizObjectManager lectManage = JBOFactory.getBizObjectManager(LB_EQUIPMENT_CAR_TEMP.CLASS_NAME);
+ List lects = lectManage.createQuery(" TERMINATE_TYPE='3' and FLOWUNID=:FLOWUNID ").setParameter("FLOWUNID", flowunid).getResultList(false);
+ for (BizObject lect : lects) {
+ fromCondtion.put("FRAME_NUMBER", lect.getAttribute("FRAME_NUMBER").toString() );
+ toCondtion.put("FRAME_NUMBER", lect.getAttribute("FRAME_NUMBER").toString() );
+ DataOperatorUtil.copySingleJBO(LB_EQUIPMENT_CAR_TEMP.CLASS_NAME, fromCondtion,LB_EQUIPMENT_CAR.CLASS_NAME, toCondtion, otherProperty, Sqlca);
+ }
+ }else {
+ service.copyOrLoadLBEquipment(Sqlca, fromCondtion, toCondtion, otherProperty, ServiceOperatorEnum.TempToFormal, null);
}
Sqlca.executeSQL(new SqlObject("update LB_EQUIPMENT_CAR_TEMP set IS_FLOW='N' where FLOWUNID='"+flowunid+"'"));
- service.copyOrLoadLBEquipment(Sqlca, fromCondtion, toCondtion, otherProperty, ServiceOperatorEnum.TempToFormal, null);
String sMessage="true";
return sMessage;
}