|
@@ -151,7 +151,7 @@ public class NhIVController {
|
|
|
McR invoice_iv2(@RequestBody Map<String, String> data) throws TencentCloudSDKException {
|
|
|
|
|
|
McException.assertParamException_Null(data, "url");
|
|
|
- String image = ydClient.convertTemporaryUrl(data.get("url"),6000,APP_TYPE,SYSTEM_TOKEN);
|
|
|
+ String image = ydClient.convertTemporaryUrl(data.get("url"),60000,APP_TYPE,SYSTEM_TOKEN);
|
|
|
log.info("混票识别, 免登地址, {}", image);
|
|
|
// 非PDF, 且内存大于3M, 压缩后上传
|
|
|
if (UtilMap.getFloat(data, "size") > 3.0f && !UtilMap.getBoolean(data, "isPdf")) {
|
|
@@ -185,7 +185,7 @@ public class NhIVController {
|
|
|
.date(UtilString.replaceDateZH_cn(UtilMap.getString(prop, "Date")))
|
|
|
.checkCode(UtilMap.getString(prop, "CheckCode"))
|
|
|
// ppExt: 多明细行时, 优先取值合计 [全电票返回了subTotal字段, 但值为空]
|
|
|
- .amount(UtilNumber.setBigDecimal(UtilMap.getString_first(prop, "SubTotal", "Total")))
|
|
|
+ .amount(UtilNumber.setBigDecimal(UtilMap.getString_first(prop, "SubTotal", "Total", "Fare")))
|
|
|
.tax(UtilNumber.setBigDecimal(UtilMap.getString_first(prop, "SubTax", "Tax")))
|
|
|
.excludingTax(UtilNumber.setBigDecimal(UtilMap.getString(prop, "PretaxAmount")))
|
|
|
.buyerName(StringUtils.isBlank(guyuanNameRepalce(UtilMap.getString(prop, "Buyer")))?"上海能辉科技股份有限公司":guyuanNameRepalce(UtilMap.getString(prop, "Buyer")))
|
|
@@ -292,6 +292,10 @@ public class NhIVController {
|
|
|
if (kind.equals(McInvoiceKind.HC.getDesc())) {
|
|
|
invoiceDto.setDepartureTime(findValue(infos, "出发时间").replace("年", "-").replace("月", "-").replace("日", " "));
|
|
|
}
|
|
|
+ // 火车票
|
|
|
+ if (kind.equals(McInvoiceKind.HCDZ.getDesc())) {
|
|
|
+ invoiceDto.setDepartureTime(findValue(infos, "出发时间").replace("年", "-").replace("月", "-").replace("日", " "));
|
|
|
+ }
|
|
|
// 出租车
|
|
|
if (kind.equals(McInvoiceKind.CZC.getDesc())) {
|
|
|
String date = findValue(infos, "日期").replace("年", "-").replace("月", "-").replace("日", " ");
|