diff --git a/WebContent/Tenwa/Gps/LmGpsOrderInfo.jsp b/WebContent/Tenwa/Gps/LmGpsOrderInfo.jsp index e8d9ddfd2..1920b571e 100644 --- a/WebContent/Tenwa/Gps/LmGpsOrderInfo.jsp +++ b/WebContent/Tenwa/Gps/LmGpsOrderInfo.jsp @@ -42,8 +42,6 @@ doTemp.setColumnAttribute("USERNAME", "COLREQUIRED", "1"); doTemp.setColumnAttribute("USERPHONE", "COLVISIBLE", "1"); doTemp.setColumnAttribute("USERPHONE", "COLREQUIRED", "1"); - doTemp.setColumnAttribute("SHOPNAME", "COLVISIBLE", "1"); - doTemp.setColumnAttribute("SHOPNAME", "COLREQUIRED", "1"); } ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request); dwTemp.Style = "2";//freeform @@ -69,19 +67,17 @@ setItemValue(0,getRow(0),"APPLY_NO",'<%=ProjectNo%>'); setItemValue(0,getRow(0),"WIRED_PERIOD",'<%=period%>'); setItemValue(0,getRow(0),"WIRELESS_PERIOD",'<%=period%>'); - if('<%=source%>'=='1'){ - setItemValue(0,getRow(0),"WIRED_NUM",'1'); - setItemValue(0,getRow(0),"WIRELESS_NUM",'1'); - } setItemValue(0,getRow(0),"FLOWUNID",'<%=flowunid%>'); setItemValue(0,getRow(0),"PROJECT_ID",'<%=ProjectId%>'); setItemValue(0,getRow(0),"INPUTUSERID",'<%=CurUser.getUserID()%>'); setItemValue(0,getRow(0),"INPUTORGID",'<%=CurUser.getOrgID()%>'); setItemValue(0,getRow(0),"INPUTTIME",new Date().Format("yyyy/MM/dd hh:mm:ss")); - setItemValue(0,getRow(0),"PICCONTACT_NAME",'<%=contact_name%>'); setItemValue(0,getRow(0),"PICCONTACT_PHONE",'<%=contact_phone%>'); setItemValue(0,getRow(0),"CAR_ACCOUNT",'<%=distributor_name%>'); + if('<%=source%>'=='1'){ + setItemValue(0,getRow(0),"SHOPNAME",'<%=distributor_name%>');//2020-11-11 yjf 修改门店取值为拉车账号 + } setItemValue(0,getRow(0),"SOURCE",'<%=source%>'); var status = getItemValue(0,getRow(),"STATUS"); diff --git a/config/gps.properties b/config/gps.properties index 08f27d443..15aa0ae43 100644 --- a/config/gps.properties +++ b/config/gps.properties @@ -6,12 +6,6 @@ TYUrl=http://121.43.178.183:9989/dispatch_intf/apiController/order TYQueryOrderToVin=http://121.43.178.183:80/gps-intf/api2/getGpsInfosByCarVin -# 中瑞ProductId -ZR_ProfuctId_one=d5e89c74-6014-11e9-bdb3-6c92bf61e2 -ZR_ProfuctId_two=d5e89c74-6014-11e9-bdb3-6c92bf61e2 -ZR_ProfuctId_three=d5e89c74-6014-11e9-bdb3-6c92bf61e2 -ZR_ProfuctId_four=d5e89c74-6014-11e9-bdb3-6c92bf61e2 -ZR_ProfuctId_five=d5e89c74-6014-11e9-bdb3-6c92bf61e2 # 中瑞appKey ZR_AppKey=2C6074D0-C8E4-4BA4-A50A-E3A46EAD394A # 中瑞下单 diff --git a/src_tenwa/com/tenwa/gps/GpsCommon.java b/src_tenwa/com/tenwa/gps/GpsCommon.java index 25cbab729..4c681d0cd 100644 --- a/src_tenwa/com/tenwa/gps/GpsCommon.java +++ b/src_tenwa/com/tenwa/gps/GpsCommon.java @@ -202,11 +202,12 @@ public class GpsCommon { * @throws Exception */ public static String zrEditCreateParameter(String applyNo, Transaction Sqlca) throws Exception { - ASResultSet res = Sqlca.getASResultSet(new SqlObject("select WIRED_PERIOD,CAR_VIN,ADDRESS_CODE,SHOPNAME,CONTACT_NAME,CONTACT_PHONE,INSTALL_TIME,ADDRESS_DETAIL,CARTYPE,USERNAME,USERPHONE from LM_GPS_ORDER_TEMP where APPLY_NO='" + applyNo + "'")); + ASResultSet res = Sqlca.getASResultSet(new SqlObject("select WIRED_PERIOD,WIRED_NUM,WIRELESS_NUM,CAR_VIN,ADDRESS_CODE,SHOPNAME,CONTACT_NAME,CONTACT_PHONE,INSTALL_TIME,ADDRESS_DETAIL,CARTYPE,USERNAME,USERPHONE from LM_GPS_ORDER_TEMP where APPLY_NO='" + applyNo + "'")); JSONObject params = new JSONObject(); while (res.next()) { params.put("AppCode", applyNo); - params.put("ProductId", getProductId(res.getInt("WIRED_PERIOD"))); + params.put("ProductId", getProductId(res.getInt("WIRED_PERIOD"), + res.getStringValue("WIRED_NUM"), res.getStringValue("WIRELESS_NUM"), Sqlca)); params.put("VIN", res.getString("CAR_VIN")); params.put("DistrictCode", res.getString("ADDRESS_CODE")); params.put("ShopName", res.getString("SHOPNAME")); @@ -224,26 +225,21 @@ public class GpsCommon { /** - * 根据安装年限选着产品(中瑞) - * @param period + * 获取产品配置(中瑞) + * + * @param period 设备年限 + * @param wireNum 有线设备数量 + * @param wirelessNum 无线设备数量 * @return */ - private static String getProductId(Integer period) throws Exception{ - if(period > 5 || period < 1) + private static String getProductId(Integer period, String wireNum, String wirelessNum, Transaction Sqlca) throws Exception { + if (period > 5 || period < 1) throw new BusinessException("gps安装年限不合法!"); - String productId = null; - switch (period){ - case 1: - productId = GPSConfigure.get("ZR_ProfuctId_one"); break; - case 2: - productId = GPSConfigure.get("ZR_ProfuctId_two"); break; - case 3: - productId = GPSConfigure.get("ZR_ProfuctId_three"); break; - case 4: - productId = GPSConfigure.get("ZR_ProfuctId_four"); break; - case 5: - productId = GPSConfigure.get("ZR_ProfuctId_five"); break; - } + SqlObject sqlObject = new SqlObject("select product_id from gps_product_info where year=:year and wire_num = wireNum and wireless_num =:wirelessNum") + .setParameter("year", period).setParameter("wireNum", wireNum).setParameter("wirelessNum", wirelessNum); + String productId = Sqlca.getString(sqlObject); + if (productId == null) + throw new BusinessException("中瑞gps产品{年限:[" + period + "]有线数量:[" + wireNum + "]无线数量:[" + wirelessNum + "]}配置不存在!"); return productId; }