From e6c2cc3dea34f2156a59ae4004de55cdce0aefce Mon Sep 17 00:00:00 2001 From: tangfutang <3218982385@qq.com> Date: Thu, 23 Sep 2021 11:37:36 +0800 Subject: [PATCH] =?UTF-8?q?app=E6=B7=BB=E5=8A=A0=E4=B8=80=E5=90=88?= =?UTF-8?q?=E5=90=8C=E5=A4=9A=E8=BD=A6=E5=92=8C=E7=A7=9F=E8=B5=81=E8=B5=8B?= =?UTF-8?q?=E5=80=BC=E8=BD=A6=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Comm/LBEquipment_Car/LBEquipmentInfo.jsp | 5 ++++ .../apply/business/start/bo/BusinessBO.java | 16 +++++++++++++ .../als/base/awe/select/SelectCatalogWin.java | 23 +++++++++++++++++-- .../SelectCarAttributeController.java | 18 +++++++++++++++ .../service/SelectCarAttributeService.java | 3 +++ .../impl/SelectCarAttributeServiceImpl.java | 14 +++++++++++ .../LBProjectIntoTempInitCarBusiness.java | 8 ++++++- 7 files changed, 84 insertions(+), 3 deletions(-) diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentInfo.jsp index 702000a00..35c0575fb 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBEquipment_Car/LBEquipmentInfo.jsp @@ -415,6 +415,11 @@ setItemValue(0,getRow(),"gears",""); setItemValue(0,getRow(),"car_typea",sReturn[3]); + if("SYC"==sReturn[3]){ + setItemValue(0,getRow(), "cartype" , "商用车" ); + }else if ("CYC"==sReturn[3]){ + setItemValue(0,getRow(), "cartype" , "乘用车" ); + } carReadonly(sReturn[3]); },"请选择车品牌",''); } diff --git a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/start/bo/BusinessBO.java b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/start/bo/BusinessBO.java index e6b9426fa..d00208097 100644 --- a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/start/bo/BusinessBO.java +++ b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/start/bo/BusinessBO.java @@ -74,6 +74,8 @@ public class BusinessBO implements Serializable { private String distributor_no; private String distributorType; + private String cartypea; //车辆类型,CYC:乘用车;SYC:商用车 + public void setParam(Map fieldMap, String param, Object obj) { obj = fieldMap.get(param.toLowerCase()) == null ? null : fieldMap.get( param.toLowerCase()).toString(); @@ -202,6 +204,8 @@ public class BusinessBO implements Serializable { this.SubjectName = MultiSubjectUtil.TJSUBJECTNAME; } } + //获取车辆类型字段 + this.cartypea = fieldMap.get("cartypea".toLowerCase()) == null ? "": fieldMap.get("cartypea".toLowerCase()).toString(); CustomerInfoCheck CustomerInfoCheck = new CustomerInfoCheck(); @@ -280,6 +284,9 @@ public class BusinessBO implements Serializable { map.put("distributorNo", distributor_no); map.put("distributorName", distributor_name); } + //添加车型字段 + map.put("cartypea", cartypea); + JSONObject jsonObject = JSONObject.fromObject(map); this.fixedFlowParam = jsonObject.toString(); @@ -650,6 +657,15 @@ public class BusinessBO implements Serializable { public void setDistributorType(String distributorType) { this.distributorType = distributorType; } + + + public String getCartypea() { + return cartypea; + } + + public void setCartypea(String cartypea) { + this.cartypea = cartypea; + } public void sethaveCommission(String haveCommission) { haveCommission = haveCommission; diff --git a/src_app_fresh/apx/com/amarsoft/als/base/awe/select/SelectCatalogWin.java b/src_app_fresh/apx/com/amarsoft/als/base/awe/select/SelectCatalogWin.java index b6f3d7f4b..69c86817f 100644 --- a/src_app_fresh/apx/com/amarsoft/als/base/awe/select/SelectCatalogWin.java +++ b/src_app_fresh/apx/com/amarsoft/als/base/awe/select/SelectCatalogWin.java @@ -9,6 +9,7 @@ import java.util.StringTokenizer; import javax.servlet.http.HttpServletRequest; +import jbo.app.LB_EQUIPMENT_CAR_TEMP; import jbo.sys.SELECT_CATALOG; import apx.com.amarsoft.als.base.cache.instance.AppCodeCache; @@ -29,6 +30,7 @@ public class SelectCatalogWin { private String sSelName; private boolean loadSelectflag = true; private Map param; + private String flowunid; public boolean isLoadSelectflag() { return loadSelectflag; @@ -81,6 +83,7 @@ public class SelectCatalogWin { } } } + this.flowunid = param.get("flowunid") == null ? "" : param.get("flowunid").toString(); this.sSelName = sSelName; try { BizObjectManager bom = JBOFactory @@ -230,12 +233,14 @@ public class SelectCatalogWin { .substring(sTableName.lastIndexOf(",") + 1); if (i > 0) { sql2 += " or "; + }else { + sql2 += " ( "; } - sql2 += "A." + sSelectFilter + " like '%" + sGlobalText + sql2 += " A." + sSelectFilter + " like '%" + sGlobalText + "%'"; i++; } -// sql2 += ")"; + sql2 += " ) "; // if (sql2.length() > 0) { // if (sqlWhere.toLowerCase().contains("where") // || sql2.toLowerCase().contains("where")) { @@ -245,6 +250,20 @@ public class SelectCatalogWin { // } // } } + if(this.flowunid!=null && this.flowunid.length() > 0) { + BizObjectManager lectm = JBOFactory.getBizObjectManager(LB_EQUIPMENT_CAR_TEMP.CLASS_NAME); + BizObject lect = lectm.createQuery("FLOWUNID=:FLOWUNID").setParameter("FLOWUNID", this.flowunid).getSingleResult(false); + if(lect!=null) { + if(sql2!=null && sql2.length() > 0) { + sql2 += " and (A.cartypea='"+lect.getAttribute("car_typea").toString()+"') "; + }else { + sql2 += " (A.cartypea='"+lect.getAttribute("car_typea").toString()+"') "; + } + } + + } + + if (!StringX.isSpace(sOtherWhere)) { String[] array = sOtherWhere.split("&"); sql = sql.replace(array[0], array[1]); diff --git a/src_app_fresh/apx/com/amarsoft/als/currency/select/apzl/car/controller/SelectCarAttributeController.java b/src_app_fresh/apx/com/amarsoft/als/currency/select/apzl/car/controller/SelectCarAttributeController.java index d5c80acfc..a3e2197f4 100644 --- a/src_app_fresh/apx/com/amarsoft/als/currency/select/apzl/car/controller/SelectCarAttributeController.java +++ b/src_app_fresh/apx/com/amarsoft/als/currency/select/apzl/car/controller/SelectCarAttributeController.java @@ -141,4 +141,22 @@ public class SelectCarAttributeController { return ReturnMapUtil.rollback(e); } } + + //获取头车信息 + @Path("/headcar/info") + @POST + public Map selectHeadCarInfo( + @Context HttpServletRequest request, @Context Transaction sqlca, + @Context JBOTransaction tx) throws Exception { + ReturnMapUtil ReturnMapUtil = new ReturnMapUtil(tx, sqlca); + ARE.getLog() + .info("[CONTROLLER] SelectCarAttributeController run ................."); + ARE.getLog().info("[Path] /select/headcar/info run ................."); + try { + return service + .selectHeadCarInfo(request, sqlca, tx, ReturnMapUtil); + } catch (Exception e) { + return ReturnMapUtil.rollback(e); + } + } } diff --git a/src_app_fresh/apx/com/amarsoft/als/currency/select/apzl/car/service/SelectCarAttributeService.java b/src_app_fresh/apx/com/amarsoft/als/currency/select/apzl/car/service/SelectCarAttributeService.java index 3ecaf9f0e..f5e819188 100644 --- a/src_app_fresh/apx/com/amarsoft/als/currency/select/apzl/car/service/SelectCarAttributeService.java +++ b/src_app_fresh/apx/com/amarsoft/als/currency/select/apzl/car/service/SelectCarAttributeService.java @@ -28,4 +28,7 @@ public interface SelectCarAttributeService { Map SubDistributionName(HttpServletRequest request, Transaction sqlca, JBOTransaction tx, ReturnMapUtil returnMapUtil) throws Exception; + + Map selectHeadCarInfo(HttpServletRequest request, Transaction sqlca, JBOTransaction tx, + ReturnMapUtil returnMapUtil) throws Exception; } diff --git a/src_app_fresh/apx/com/amarsoft/als/currency/select/apzl/car/service/impl/SelectCarAttributeServiceImpl.java b/src_app_fresh/apx/com/amarsoft/als/currency/select/apzl/car/service/impl/SelectCarAttributeServiceImpl.java index db146c09b..80424425f 100644 --- a/src_app_fresh/apx/com/amarsoft/als/currency/select/apzl/car/service/impl/SelectCarAttributeServiceImpl.java +++ b/src_app_fresh/apx/com/amarsoft/als/currency/select/apzl/car/service/impl/SelectCarAttributeServiceImpl.java @@ -97,4 +97,18 @@ public class SelectCarAttributeServiceImpl implements SelectCarAttributeService{ return ReturnMapUtil.getReturnMap(); } + @Override + public Map selectHeadCarInfo(HttpServletRequest request, Transaction sqlca, JBOTransaction tx, + ReturnMapUtil ReturnMapUtil) throws Exception { + Map testMap = (Map) MultipartDataUtil.readRequestParam(request, "UTF-8"); + Map fieldMap = (Map) testMap.get("fieldMap"); + String flowunid = fieldMap.get("flowunid") == null ? "" : fieldMap.get("flowunid").toString(); + List> dataList = DataOperatorUtil.getDataBySql("SELECT UU_ID,BRAND,CAR_SERIES,MODEL,NOW_TOTAL FROM LB_EQUIPMENT_CAR_TEMP WHERE car_attribute='head' AND flowunid='"+flowunid+"' "); + Map body = new HashMap(); + body.put("headCarInfo", dataList); + ReturnMapUtil.setReturnMap(body,RestfullConstant.baseProperty.get("success").toString(), + "查询成功"); + return ReturnMapUtil.getReturnMap(); + } + } 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 34c9e3149..9dcea529c 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBProjectIntoTempInitCarBusiness.java +++ b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBProjectIntoTempInitCarBusiness.java @@ -326,7 +326,13 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness { bmLEC.setAttributeValue("INPUTUSERID", asUser.getUserID());//登记人 bmLEC.setAttributeValue("INPUTORGID", asUser.getOrgID());//登记部门 bmLEC.setAttributeValue("INPUTTIME", StringFunction.getTodayNow());//登记时间,系统当前时间 - bmLEC.setAttributeValue("cartype",this.getAttribute("cartype")); +// bmLEC.setAttributeValue("cartype",this.getAttribute("cartype")); + String cartypea = this.getAttribute("cartypea") == null ? "" : this.getAttribute("cartypea").toString() ; + if(cartypea.equals("SYC")) { + bmLEC.setAttributeValue("cartype","商用车"); + }else if(cartypea.equals("CYC")){ + bmLEC.setAttributeValue("cartype","乘用车"); + } bmLEC.setAttributeValue("vehicletype",this.getAttribute("vehicletype")); bmLEC.setAttributeValue("vehiclelevel",this.getAttribute("vehiclelevel")); bmLEC.setAttributeValue("car_attribute","head");