diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentInfo.jsp index 1602052ac..3d49a1703 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentInfo.jsp @@ -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; } diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit/LBGuaranteePerUnitInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit/LBGuaranteePerUnitInfo.jsp index 8f3a2f59e..2770fbe9c 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit/LBGuaranteePerUnitInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit/LBGuaranteePerUnitInfo.jsp @@ -148,10 +148,10 @@ if(falgs==false){ return; } - var WorkTelResult = checkWorkTel(); + /* var WorkTelResult = checkWorkTel(); if(WorkTelResult==false){ return; - } + } */ as_save(0,"goBack()"); } diff --git a/src_tenwa/com/tenwa/lease/flow/project/businessapply/BusinessApproveManager.java b/src_tenwa/com/tenwa/lease/flow/project/businessapply/BusinessApproveManager.java index a2a60034f..95fc77cb7 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/businessapply/BusinessApproveManager.java +++ b/src_tenwa/com/tenwa/lease/flow/project/businessapply/BusinessApproveManager.java @@ -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"; + } + }