diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentInfo.jsp index ca8932322..4f84d14cc 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentInfo.jsp @@ -164,6 +164,7 @@ setItemRequired(0,"FRAME_NUMBER",true); setItemRequired(0,"ENGINE_NUMBER",true); setItemRequired(0,"CAR_COLOUR",true); + $("#ZONE").attr("ReadOnly","true"); } if("合同制作流程"=="<%=flowName%>"||"合同变更流程"=="<%=flowName%>"){ setItemRequired(0,"FRAME_NUMBER",true); diff --git a/src_tenwa/com/tenwa/lease/app/vehicleAssessment/vehicleAssessmentController.java b/src_tenwa/com/tenwa/lease/app/vehicleAssessment/vehicleAssessmentController.java index 0be71a4b5..5d36a2aa0 100644 --- a/src_tenwa/com/tenwa/lease/app/vehicleAssessment/vehicleAssessmentController.java +++ b/src_tenwa/com/tenwa/lease/app/vehicleAssessment/vehicleAssessmentController.java @@ -92,10 +92,23 @@ public class vehicleAssessmentController { if(codeSNT != null){ BizObject zoneResult = codeSNT.createQuery("select itemname,itemno FROM O WHERE codeno='AreaCode' AND itemname=:AREA") .setParameter("AREA",area).getSingleResult(false); - if(zoneResult != null){ - zone = zoneResult.getAttribute("itemno").getString().substring(0,4)+"00"; + + String itemno = zoneResult == null ? "" : zoneResult.getAttribute("itemno").toString(); + if(null == itemno || "".equals(itemno) || itemno.length() == 0 ){ + return "没有查询到对应的上牌地区信息!!!"; + } else if("00".equals(itemno.subSequence(4, 6))){ + return "没有查询到对应的上牌地区信息!!!"; + }else{ + BizObject usedCarCode = codeSNT.createQuery("select itemname,itemno FROM O WHERE codeno='UsedCarCode' AND itemno=:AREA") + .setParameter("AREA",itemno).getSingleResult(false); + if(null != usedCarCode){ + zone = itemno; + }else{ + zone = itemno.substring(0,4)+"00"; + } System.out.println("二手车评估地址ID:"+zone); - } + } + } //因为从数据库获取到的上牌日期的格式不满足接口需求,所以要利用SimpleDateFormat进行变换 Date date = new SimpleDateFormat("yyyy/MM/dd").parse(boLSNT.getAttribute("regDate").toString());