diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentInfo.jsp index ad484cb92..372669d0b 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentInfo.jsp @@ -88,7 +88,7 @@ doTemp.setDefaultValue("equip_type", sEquipType); CurPage.getCurComp().setAttribute("RightType", null); doTemp.setHtmlEvent("FRAME_NUMBER", "onChange", "checkFrameNumber");//校验车架号格式 - doTemp.setHtmlEvent("CAR_ATTRIBUTE", "onChange", "changeHeadInfo");//校验车架号格式 + doTemp.setHtmlEvent("CAR_ATTRIBUTE", "onChange", "changeHeadInfo");//根据车辆类型是否显示挂车 //doTemp.setHtmlEvent("FRAME_NUMBER2", "onChange", "checkFrameNumber2");//校验车架号格式 doTemp.setColInnerBtEvent("BRAND", "SelectCardataBrand()"); doTemp.setColInnerBtEvent("car_series", "SelectCardataSeries()"); @@ -330,8 +330,13 @@ } setItemValue(0,0,"project_id",projectId);//设置项目id } + var equipPrice = getItemValue(0,getRow(0),"EQUIP_PRICE"); + if(equipPrice <= 0){ + alert("请输入正确车辆交易价!!!"); + return ; + } if("SYC"==carTypea){//如果是商用车,将车辆交易价赋值给新车指导价 - setItemValue(0,0,"NOW_TOTAL",getItemValue(0,getRow(0),"EQUIP_PRICE")); + setItemValue(0,0,"NOW_TOTAL", equipPrice ); } var ApplyType = "<%=ApplyType%>"; @@ -456,7 +461,7 @@ setItemValue(0,getRow(),"modelId",sReturn[0]); setItemValue(0,getRow(),"MODEL",sReturn[1]); setItemValue(0,getRow(),"NOW_TOTAL",MyOjbect.price); - setItemValue(0,getRow(),"EQUIP_PRICE",MyOjbect.price); +// setItemValue(0,getRow(),"EQUIP_PRICE",MyOjbect.price); setItemValue(0,getRow(),"DISPLACEMENT",sReturn[3]); setItemValue(0,getRow(),"gears",sReturn[4]); @@ -756,9 +761,13 @@ if("tail"==carAttribute){ showItem(0,"head_name",''); setItemRequired(0,"head_name",true); + setItemRequired(0,"ENGINE_NUMBER",false); }else{ showItem(0,"head_name",'none'); setItemRequired(0,"head_name",false); + if("new_car"!="<%=carAttributes%>"||"合同制作流程"=="<%=flowName%>"||"合同变更流程"=="<%=flowName%>"){ + setItemRequired(0,"ENGINE_NUMBER",true); + } } } diff --git a/calc/com/tenwa/reckon/executor/RentCalHelper.java b/calc/com/tenwa/reckon/executor/RentCalHelper.java index 077a0ed13..599d8de64 100644 --- a/calc/com/tenwa/reckon/executor/RentCalHelper.java +++ b/calc/com/tenwa/reckon/executor/RentCalHelper.java @@ -364,7 +364,7 @@ public class RentCalHelper { } public String rentPlanDate(){ - JBOTransaction tx; + JBOTransaction tx = null; try { tx = JBOFactory.createJBOTransaction(); String sql = "SELECT CASE WHEN COUNT(*) > 0 THEN MAX(PLAN_DATE) ELSE 'null' END date FROM lc_rent_plan WHERE DATE_FORMAT(PLAN_DATE, '%Y/%m/%d') <= DATE_FORMAT('"+this.paydayAdjust+"', '%Y/%m/%d') AND contract_id =?"; @@ -380,6 +380,14 @@ public class RentCalHelper { } } catch (Exception e) { e.printStackTrace(); + }finally { + try { + if(tx !=null) { + tx.commit(); + } + } catch (JBOException e) { + e.printStackTrace(); + } } return "error"; diff --git a/src_tenwa/com/tenwa/lease/flow/project/businessapply/CheckGuaranteeUnit.java b/src_tenwa/com/tenwa/lease/flow/project/businessapply/CheckGuaranteeUnit.java index 13fedd030..7a974fb84 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/businessapply/CheckGuaranteeUnit.java +++ b/src_tenwa/com/tenwa/lease/flow/project/businessapply/CheckGuaranteeUnit.java @@ -14,9 +14,9 @@ public class CheckGuaranteeUnit { private String flowunid; private int number; - public String CheckGuaranteeUnitCount(JBOTransaction tx) throws SQLException{ + public String CheckGuaranteeUnitCount(JBOTransaction tx) throws Exception{ Transaction Sqlca =null; - Sqlca = Transaction.createTransaction(CacheLoaderFactory.getDataSource()); + Sqlca = Transaction.createTransaction(tx); String sql="select count(1) as count from LB_GUARANTEE_UNIT_TEMP where FLOWUNID=:flowunid"; SqlObject asql = new SqlObject(sql); asql.setParameter("flowunid", this.flowunid); diff --git a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBProjectIntoTempInitCarBusiness.java b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBProjectIntoTempInitCarBusiness.java index be1551ca9..aeb1098c2 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBProjectIntoTempInitCarBusiness.java +++ b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBProjectIntoTempInitCarBusiness.java @@ -329,8 +329,8 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness { bmLEC.setAttributeValue("vehiclelevel",this.getAttribute("vehiclelevel")); bmLEC.setAttributeValue("car_attribute","head"); bmLEC.setAttributeValue("car_typea",this.getAttribute("cartypea")); - bmLEC.setAttributeValue("EQUIP_PRICE", this.getAttribute("price")==null || this.getAttribute("price").toString().equals("null")?"0.00":this.getAttribute("price"));//车辆指导价 - bmLEC.setAttributeValue( "uu_id" , UUIDUtil.getUUID() );//车辆指导价 + bmLEC.setAttributeValue("EQUIP_PRICE", "0.00");//车辆交易价 + bmLEC.setAttributeValue( "uu_id" , UUIDUtil.getUUID() );//标识 if(lbat!=null){ bmLEC.setAttributeValue("FRAME_NUMBER", lbat.getAttribute("frame_number")+"");//车架号