修改部分结清车辆状态
This commit is contained in:
parent
fea7131248
commit
28e9f6825d
@ -3677,6 +3677,7 @@
|
||||
<attribute name="head_name" label="头车名称" type="STRING" length="100"/>
|
||||
<attribute name="is_tail" label="头车字段(是否有挂车)" type="STRING" length="2"/>
|
||||
<attribute name="uu_id" label="标识" type="STRING" length="32"/>
|
||||
<attribute name="TERMINATE_TYPE" label="标识租赁物是否结清" type="STRING" length="32"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
|
||||
@ -457,4 +457,8 @@ public interface LB_EQUIPMENT_CAR_TEMP{
|
||||
* ±êʶ STRING(32)<br>
|
||||
*/
|
||||
public static final String uu_id = "uu_id";
|
||||
/**
|
||||
* 标识租赁物是否结清 STRING(32)<br>
|
||||
*/
|
||||
public static final String TERMINATE_TYPE = "TERMINATE_TYPE";
|
||||
}
|
||||
@ -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();
|
||||
Map<String,String>fromCondtion=this.getDefaultTempToFormalFromCondtion();
|
||||
Map<String,String>toCondtion=this.getDefaultTempToFormalToCondtion();
|
||||
Map<String,String>otherProperty=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<BizObject> 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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user