Commit 1b3bcb68 authored by hezhen's avatar hezhen

Merge branch 'dev-tiande' of http://113.105.137.151:22280/youjj/cloud-platform into dev-tiande

parents 8ddaa680 5ca9ddcb
...@@ -2,6 +2,7 @@ package com.xxfc.platform.universal.service.PictureParsing.impl; ...@@ -2,6 +2,7 @@ package com.xxfc.platform.universal.service.PictureParsing.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.map.MapUtil; import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.github.wxiaoqi.security.common.exception.BaseException; import com.github.wxiaoqi.security.common.exception.BaseException;
import com.xxfc.platform.universal.entity.IDCardInformation; import com.xxfc.platform.universal.entity.IDCardInformation;
...@@ -140,7 +141,7 @@ public class XCFQPictureParsingImpl implements UserPictureParsing { ...@@ -140,7 +141,7 @@ public class XCFQPictureParsingImpl implements UserPictureParsing {
Map<String, String> querys = new HashMap<String, String>(); Map<String, String> querys = new HashMap<String, String>();
Map<String, String> bodys = new HashMap<String, String>(); Map<String, String> bodys = new HashMap<String, String>();
String imgUrlToBase64 = getImgUrlToBase64(imageUrl); String imgUrlToBase64 = getImgUrlToBase64(imageUrl);
bodys.put("image", imgUrlToBase64); bodys.put("image", "data:image/png;base64,"+ imgUrlToBase64);
try { try {
return callExternalRequest(headers,querys,bodys,1); return callExternalRequest(headers,querys,bodys,1);
} catch (Exception e) { } catch (Exception e) {
...@@ -223,7 +224,17 @@ public class XCFQPictureParsingImpl implements UserPictureParsing { ...@@ -223,7 +224,17 @@ public class XCFQPictureParsingImpl implements UserPictureParsing {
} }
} }
// 对字节数组Base64编码 // 对字节数组Base64编码
return new BASE64Encoder().encode(buffer); String str = new BASE64Encoder().encode(buffer);
if(StrUtil.isNotBlank(str)) {
str = str.replaceAll("\n","");
}
return str;
}
public static void main(String[] args) {
String str = getImgUrlToBase64("http://xxtest.upyuns.com/image/app/2020-10-19/3.jpg");
//str = str.replaceAll("\n","");
System.out.println(str);
} }
} }
...@@ -140,6 +140,9 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements ...@@ -140,6 +140,9 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements
PageDataVO<UsableVehicleModelVO> uvmvpdvs = vehicleBiz.searchUsableModel(dto); PageDataVO<UsableVehicleModelVO> uvmvpdvs = vehicleBiz.searchUsableModel(dto);
if(CollUtil.isNotEmpty(uvmvpdvs.getData())){ if(CollUtil.isNotEmpty(uvmvpdvs.getData())){
uvmvpdvs.getData().forEach(data -> { uvmvpdvs.getData().forEach(data -> {
if(SYS_TRUE.intValue() != data.getHasVehicle()) {
return;
}
data.setHasVehicle(SYS_FALSE); data.setHasVehicle(SYS_FALSE);
// if(StrUtil.isNotBlank(data.getVehicleIds())) { // if(StrUtil.isNotBlank(data.getVehicleIds())) {
// String[] strs = StrUtil.split(data.getVehicleIds(), ","); // String[] strs = StrUtil.split(data.getVehicleIds(), ",");
......
...@@ -1019,6 +1019,12 @@ ...@@ -1019,6 +1019,12 @@
<select id="searchUsableModel" parameterType="java.util.Map" <select id="searchUsableModel" parameterType="java.util.Map"
resultMap="searchUsableModelMap"> resultMap="searchUsableModelMap">
<if test="startCompanyId != null or parkBranchCompanyId != null ">
select model_id, company_id
<if test="lon != null and lat != null">, distance</if>
<if test=" yearMonthAndParam !=null ">, max(hasVehicle) as hasVehicle</if>
from (
</if>
(select distinct vm.id as model_id, bc.id as company_id (select distinct vm.id as model_id, bc.id as company_id
<!-- , group_concat(v.id) as vehicle_ids --> <!-- , group_concat(v.id) as vehicle_ids -->
<if test=" catas != null "> <if test=" catas != null ">
...@@ -1029,7 +1035,8 @@ ...@@ -1029,7 +1035,8 @@
, ,
<if test="yearNo4Where != null and yearNo4Where == true"> <if test="yearNo4Where != null and yearNo4Where == true">
(max( (max(
ifnull(vbi.bit_str = #{yearMonthAndParamBitStr}, false) ifnull(
vbi.bit_str = #{yearMonthAndParamBitStr}, false)
<!-- 租车列表 不过滤前后预约记录不符的车辆 但是合并标示车型是否有车 即 hasVehicle--> <!-- 租车列表 不过滤前后预约记录不符的车辆 但是合并标示车型是否有车 即 hasVehicle-->
<if test="withoutRecordWhere != null and withoutRecordWhere = 1 and startCompanyId != null and endCompanyId != null "> <if test="withoutRecordWhere != null and withoutRecordWhere = 1 and startCompanyId != null and endCompanyId != null ">
<!-- and (abr.to_lift_company is null or abr.to_lift_company = #{startCompanyId})--> <!-- and (abr.to_lift_company is null or abr.to_lift_company = #{startCompanyId})-->
...@@ -1105,14 +1112,18 @@ ...@@ -1105,14 +1112,18 @@
</otherwise> </otherwise>
</choose> </choose>
where vm.isdel = 0 and vm.status = 1 and vm.app_show = 1) where vm.isdel = 0 and vm.status = 1 and vm.app_show = 1)
) as total_table
group by model_id, company_id
<if test="lon != null and lat != null">, distance</if>
</if> </if>
<if test="lon != null and lat != null">
order by order by
<if test=" yearMonthAndParam !=null and yearNo4Where != null and yearNo4Where == true"> <if test=" yearMonthAndParam !=null">
hasVehicle desc, hasVehicle desc,
</if> </if>
distance asc, model_id asc <if test="lon != null and lat != null">
distance asc,
</if> </if>
model_id asc
</select> </select>
<select id="searchUsableVehicle" parameterType="java.util.Map" <select id="searchUsableVehicle" parameterType="java.util.Map"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment