|
|
@ -914,26 +914,41 @@ public class CrmCustomerService extends MybatisBaseService<CrmCustomerMapper, Cr |
|
|
|
System.out.println(result.get("X-TC-Action")); |
|
|
|
System.out.println(result.get("X-TC-Region")); |
|
|
|
|
|
|
|
|
|
|
|
// {"Response":{"RequestId":"8894294b-702c-4517-ae0f-590120dfde82","Error":{"Code":"FailedOperation.DownLoadError","Message":"下载失败"}}}
|
|
|
|
String resultOne = HttpUtils.sendPost("https://ocr.tencentcloudapi.com", result, json); |
|
|
|
System.out.println(resultOne); |
|
|
|
JSONObject jsonObject = JSONObject.parseObject(resultOne); |
|
|
|
Map<String, Object> map = JSONObject.parseObject(jsonObject.toJSONString(), new TypeReference<Map<String, Object>>() { |
|
|
|
|
|
|
|
|
|
|
|
JSONObject object = JSONObject.parseObject(resultOne); |
|
|
|
Map<String, Object> mapOneResult = JSONObject.parseObject(object.toJSONString(), new TypeReference<Map<String, Object>>() { |
|
|
|
}); |
|
|
|
Map<String, Object> map1 = ConstantUtils.getMap(map, "Response"); |
|
|
|
if (MLID_PASSPORTOCR.equals(type)) {//港澳居民台湾同胞通行证
|
|
|
|
cardName = ConstantUtils.getString(map1, "Name", ""); |
|
|
|
cardNum = ConstantUtils.getString(map1, "Number", ""); |
|
|
|
} else if (PERMITOCR.equals(type)) {//护照
|
|
|
|
cardName = ConstantUtils.getString(map1, "Name", ""); |
|
|
|
cardNum = ConstantUtils.getString(map1, "ID", ""); |
|
|
|
} else if (ID_CARDOCR.equals(type)) {//身份证
|
|
|
|
cardName = ConstantUtils.getString(map1, "Name", ""); |
|
|
|
cardNum = ConstantUtils.getString(map1, "IdNum", ""); |
|
|
|
if (mapOneResult.containsKey("Response")) { |
|
|
|
Map<String, Object> mapOneResultOne = ConstantUtils.getMap(mapOneResult, "Response"); |
|
|
|
if (mapOneResultOne.containsKey("Error")) { |
|
|
|
return new ResultBean().fail().setMsg("读取失败"); |
|
|
|
} |
|
|
|
} |
|
|
|
mapOne.put("Response", map1); |
|
|
|
mapOne.put("cardName", cardName); |
|
|
|
mapOne.put("cardNum", cardNum); |
|
|
|
if (StringUtils.isNotBlank(resultOne)) { |
|
|
|
|
|
|
|
System.out.println(resultOne); |
|
|
|
JSONObject jsonObject = JSONObject.parseObject(resultOne); |
|
|
|
Map<String, Object> map = JSONObject.parseObject(jsonObject.toJSONString(), new TypeReference<Map<String, Object>>() { |
|
|
|
}); |
|
|
|
Map<String, Object> map1 = ConstantUtils.getMap(map, "Response"); |
|
|
|
if (MLID_PASSPORTOCR.equals(type)) {//港澳居民台湾同胞通行证
|
|
|
|
cardName = ConstantUtils.getString(map1, "Name", ""); |
|
|
|
cardNum = ConstantUtils.getString(map1, "Number", ""); |
|
|
|
} else if (PERMITOCR.equals(type)) {//护照
|
|
|
|
cardName = ConstantUtils.getString(map1, "Name", ""); |
|
|
|
cardNum = ConstantUtils.getString(map1, "ID", ""); |
|
|
|
} else if (ID_CARDOCR.equals(type)) {//身份证
|
|
|
|
cardName = ConstantUtils.getString(map1, "Name", ""); |
|
|
|
cardNum = ConstantUtils.getString(map1, "IdNum", ""); |
|
|
|
} |
|
|
|
mapOne.put("Response", map1); |
|
|
|
mapOne.put("cardName", cardName); |
|
|
|
mapOne.put("cardNum", cardNum); |
|
|
|
} |
|
|
|
|
|
|
|
return ResultBean.fireSuccess().setData(mapOne); |
|
|
|
} |
|
|
|
return new ResultBean().fail().setMsg("上传失败"); |
|
|
@ -959,8 +974,8 @@ public class CrmCustomerService extends MybatisBaseService<CrmCustomerMapper, Cr |
|
|
|
return baseMapper.cusList(); |
|
|
|
} |
|
|
|
|
|
|
|
public int updateRemindAndByCustomerSid(String customerSid,String remind_day,String remind_remark,String isOnRemind,String isOnRemindkey) { |
|
|
|
return baseMapper.updateRemindAndByCustomerSid(customerSid,remind_day,remind_remark,isOnRemind,isOnRemindkey); |
|
|
|
public int updateRemindAndByCustomerSid(String customerSid, String remind_day, String remind_remark, String isOnRemind, String isOnRemindkey) { |
|
|
|
return baseMapper.updateRemindAndByCustomerSid(customerSid, remind_day, remind_remark, isOnRemind, isOnRemindkey); |
|
|
|
} |
|
|
|
|
|
|
|
/*获取身份证信息*/ |
|
|
|