添加合同制作车架号校验
This commit is contained in:
parent
4c53be311d
commit
630d01a5ee
@ -54,7 +54,6 @@
|
||||
String carAttributes=CurPage.getParameter("carAttributes");
|
||||
String Leasehold=CurPage.getParameter("Leasehold");
|
||||
String FlowNo=CurPage.getParameter("FlowNo");
|
||||
System.out.println("======================="+carAttributes);
|
||||
%>
|
||||
<%/*~END~*/%>
|
||||
|
||||
@ -147,9 +146,24 @@
|
||||
setItemRequired(0,"FRAME_NUMBER",true);
|
||||
setItemRequired(0,"CAR_COLOUR",true);
|
||||
setItemRequired(0,"ENGINE_NUMBER",true);
|
||||
var falg = checkCarNumber();
|
||||
if(falg){
|
||||
$("#FRAME_NUMBER").css("color","red");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function checkCarNumber(){
|
||||
var id = getItemValue(0,getRow(0),"ID");
|
||||
var framenumber = getItemValue(0,getRow(0),"FRAME_NUMBER");
|
||||
var sResult = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.BusinessApproveManager","checkCarNumber","phaseNo="+id+",plate_number="+framenumber);
|
||||
if("EROOR"==sResult){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//Ê¡ÊÐ
|
||||
function selectRegionCode(){
|
||||
var sCity = "";
|
||||
@ -396,12 +410,12 @@
|
||||
|
||||
function checkFrameNumber(){
|
||||
var vin = getItemValue(0,getRow(0),"FRAME_NUMBER");
|
||||
// if (!getCheckCode(vin)){
|
||||
// setErrorTips("FRAME_NUMBER","车架号格式有误!");
|
||||
// return false;
|
||||
// }else{
|
||||
// setErrorTips("FRAME_NUMBER","");
|
||||
// }
|
||||
if (!getCheckCode(vin)){
|
||||
setErrorTips("FRAME_NUMBER","³µ¼ÜºÅ¸ñʽÓÐÎó£¡");
|
||||
return false;
|
||||
}else{
|
||||
setErrorTips("FRAME_NUMBER","");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -148,10 +148,10 @@
|
||||
if(falgs==false){
|
||||
return;
|
||||
}
|
||||
var WorkTelResult = checkWorkTel();
|
||||
/* var WorkTelResult = checkWorkTel();
|
||||
if(WorkTelResult==false){
|
||||
return;
|
||||
}
|
||||
} */
|
||||
as_save(0,"goBack()");
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.tenwa.lease.flow.project.businessapply;
|
||||
|
||||
import jbo.app.LB_EQUIPMENT_CAR;
|
||||
import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO_TEMP;
|
||||
import jbo.sys.CAR_PLATENUMBER_CODE;
|
||||
import jbo.sys.FLOW_OPINION;
|
||||
@ -7,6 +8,7 @@ import jbo.sys.FLOW_TASK;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.JBOException;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.are.util.StringFunction;
|
||||
@ -216,4 +218,19 @@ public class BusinessApproveManager {
|
||||
return message;
|
||||
}
|
||||
|
||||
public String checkCarNumber(JBOTransaction tx) throws Exception{
|
||||
BizObjectManager lecManger = JBOFactory.getBizObjectManager(LB_EQUIPMENT_CAR.CLASS_NAME, tx);
|
||||
BizObject lec = lecManger.createQuery("select O.id from O left join jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO lci on O.contract_id=lci.id "
|
||||
+ " where O.FRAME_NUMBER=:prameNumber and lci.contract_status BETWEEN 21 AND 105")
|
||||
.setParameter("prameNumber", plate_number).getSingleResult(false);
|
||||
if(lec !=null){
|
||||
if(lec.getAttribute("ID").getString().equals(phaseNo)){
|
||||
return "SUCCESS";
|
||||
}else{
|
||||
return "EROOR";
|
||||
}
|
||||
}
|
||||
return "SUCCESS";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user