Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
12ba7d8ff4
@ -27,7 +27,6 @@ import java.util.Map;
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/driving/license")
|
||||
@NotIntercept
|
||||
@SuppressWarnings("unchecked")
|
||||
public class RecognizeDrivingLicenseController extends BaseController {
|
||||
|
||||
@ -44,7 +43,7 @@ public class RecognizeDrivingLicenseController extends BaseController {
|
||||
}
|
||||
Map<String, Object> data = requestBaidu(getContent(bVehicleLicenseRequest));
|
||||
if (data == null) {
|
||||
return R.error("识别失败");
|
||||
return R.error("行驶证识别失败");
|
||||
}
|
||||
|
||||
R<Object> result = R.ok();
|
||||
@ -72,7 +71,7 @@ public class RecognizeDrivingLicenseController extends BaseController {
|
||||
return "detectDirection 必须传 " + ApiConstants.trueOrFalse + ",false:不进行图像方向自动矫正, true: 开启图像方向自动矫正功能,可对旋转 90/180/270 度的图片进行自动矫正并识别";
|
||||
}
|
||||
if (checkNotFrontBack(request.getVehicleLicenseSide())) {
|
||||
return "vehicleLicenseSide 必须传 " + ApiConstants.frontOrback + ",front:正向, back反面";
|
||||
return "front 必须传 " + ApiConstants.frontOrback + ",front:正向, back反面";
|
||||
}
|
||||
if (checkNotTrueFalse(request.getUnified())) {
|
||||
return "unified必须为 " + ApiConstants.trueOrFalse + ", false 不进行归一化处理, rue:对输出字段进行归一化处理,将新/老版行驶证的“注册登记日期/注册日期”统一为”注册日期“进行输出";
|
||||
@ -137,6 +136,7 @@ public class RecognizeDrivingLicenseController extends BaseController {
|
||||
private RecognizeDrivingLicenseFaceResp toFaceResp(Map<String, Object> data) {
|
||||
RecognizeDrivingLicenseFaceResp faceResp = new RecognizeDrivingLicenseFaceResp();
|
||||
faceResp.setIssueDate(MapUtils.getByExpr(data, "words_result.发证日期.words"));
|
||||
faceResp.setIssueAuthority(MapUtils.getByExpr(data, "words_result.发证单位.words"));
|
||||
faceResp.setModel(MapUtils.getByExpr(data, "words_result.品牌型号.words"));
|
||||
faceResp.setVehicleType(MapUtils.getByExpr(data, "words_result.车辆类型.words"));
|
||||
faceResp.setOwner(MapUtils.getByExpr(data, "words_result.所有人.words"));
|
||||
@ -161,6 +161,8 @@ public class RecognizeDrivingLicenseController extends BaseController {
|
||||
backResp.setApprovedPassengerCapacity(MapUtils.getByExpr(data, "words_result.核定载人数.words"));
|
||||
backResp.setEnergyType(MapUtils.getByExpr(data, "words_result.燃油类型.words"));
|
||||
backResp.setApprovedLoad(MapUtils.getByExpr(data, "words_result.核定载质量.words"));
|
||||
backResp.setRemark(MapUtils.getByExpr(data, "words_result.备注.words"));
|
||||
backResp.setCertificateNumber(MapUtils.getByExpr(data, "words_result.证芯编号.words"));
|
||||
return backResp;
|
||||
}
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ public class VehicleLicenseRequest {
|
||||
* - front:默认值,识别行驶证主页
|
||||
* - back:识别行驶证副页
|
||||
*/
|
||||
private String side;
|
||||
private String side = "front";
|
||||
|
||||
|
||||
|
||||
|
||||
@ -97,6 +97,22 @@ public class RecognizeDrivingLicenseBackResp extends BaseResp {
|
||||
*/
|
||||
private String approvedLoad;
|
||||
|
||||
/**
|
||||
* 备注。
|
||||
*
|
||||
* 示例值:
|
||||
* 2033-10-25
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 证芯编号。
|
||||
*
|
||||
* 示例值:
|
||||
* 50027372380230106
|
||||
*/
|
||||
private String certificateNumber;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -35,6 +35,13 @@ public class RecognizeDrivingLicenseFaceResp extends BaseResp {
|
||||
*/
|
||||
public String issueDate;
|
||||
|
||||
/**
|
||||
* 发证单位。
|
||||
*
|
||||
* 示例值:
|
||||
* 北京市公安局公安交通管理局
|
||||
*/
|
||||
public String issueAuthority;
|
||||
|
||||
/***
|
||||
* 品牌型号。
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user