添加二手车上牌日期、里程数、上牌时间校验
This commit is contained in:
parent
1bc497e8ac
commit
c349f0cd00
@ -0,0 +1,61 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package com.tenwa.lease.flow.project.commcheck;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import jbo.com.tenwa.lease.comm.LB_EQUIPMENT_CAR_TEMP;
|
||||
import jbo.com.tenwa.lease.comm.LB_PROJECT_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.template.check.DefaultBussinessCheck;
|
||||
|
||||
/**
|
||||
* 二手车添加校验
|
||||
*
|
||||
*/
|
||||
public class OldCarCheck extends DefaultBussinessCheck {
|
||||
@Override
|
||||
public Object run(Transaction Sqlca) throws Exception {
|
||||
StringBuffer Message = new StringBuffer();
|
||||
Message.append("未填写:");
|
||||
String flowunid=this.getAttribute("ObjectNo").toString();
|
||||
BizObjectManager lpitMange = JBOFactory.getBizObjectManager(LB_PROJECT_INFO_TEMP.CLASS_NAME, Sqlca);
|
||||
BizObject lpit = lpitMange.createQuery("FLOWUNID=:flowunid").setParameter("FLOWUNID", flowunid).getSingleResult(false);
|
||||
if("used_car".equals(lpit.getAttribute("CAR_TYPE").getString())){
|
||||
BizObjectManager lecttMange = JBOFactory.getBizObjectManager(LB_EQUIPMENT_CAR_TEMP.CLASS_NAME, Sqlca);
|
||||
BizObject lect = lecttMange.createQuery("FLOWUNID=:flowunid").setParameter("FLOWUNID", flowunid).getSingleResult(false);
|
||||
boolean falg = false;
|
||||
if(lect.getAttribute("zone").getString().length()<=0){
|
||||
falg = true;
|
||||
Message.append("上牌地区 ");
|
||||
}
|
||||
if(lect.getAttribute("regDate").getString().length()<=0){
|
||||
falg = true;
|
||||
Message.append("上牌日期 ");
|
||||
}
|
||||
if(lect.getAttribute("mile").getString().length()<=0){
|
||||
falg = true;
|
||||
Message.append("里程数 ");
|
||||
}
|
||||
if(falg){
|
||||
putMsg(Message.toString());
|
||||
setPass(false);
|
||||
}else{
|
||||
putMsg("已填写!");
|
||||
setPass(true);
|
||||
}
|
||||
}else{
|
||||
putMsg("新车");
|
||||
setPass(true);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user