|
|
|
@ -103,7 +103,6 @@ public class AisinoConsoleInvoiceApiZhongQiServiceImpl implements IInvoiceApiSer |
|
|
|
|
static final String SUFFIX = ".tmp";//后缀字符串定义文件的扩展名;如果为null,则将使用后缀".tmp"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 1.发票开具 SID = 1 |
|
|
|
|
* |
|
|
|
@ -293,12 +292,12 @@ public class AisinoConsoleInvoiceApiZhongQiServiceImpl implements IInvoiceApiSer |
|
|
|
|
try { |
|
|
|
|
// 控制台文档给的不对,反了
|
|
|
|
|
String jdcbz = aisinoConsoleInvoiceAddDTO.getJDCBZ() != null ? aisinoConsoleInvoiceAddDTO.getJDCBZ() : ""; |
|
|
|
|
log.info("机动车标志:{}",jdcbz); |
|
|
|
|
if("1".equals(jdcbz)){ |
|
|
|
|
log.info("机动车标志:{}", jdcbz); |
|
|
|
|
if ("1".equals(jdcbz)) { |
|
|
|
|
aisinoConsoleInvoiceAddDTO.setJDCBZ("2"); |
|
|
|
|
}else if("2".equals(jdcbz)){ |
|
|
|
|
} else if ("2".equals(jdcbz)) { |
|
|
|
|
aisinoConsoleInvoiceAddDTO.setJDCBZ("1"); |
|
|
|
|
}else { |
|
|
|
|
} else { |
|
|
|
|
aisinoConsoleInvoiceAddDTO.setJDCBZ("2"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -405,7 +404,7 @@ public class AisinoConsoleInvoiceApiZhongQiServiceImpl implements IInvoiceApiSer |
|
|
|
|
try { |
|
|
|
|
Long c = Long.valueOf(RandomUtil.randomInt(3, 5)); |
|
|
|
|
Thread.sleep(c * 1000); |
|
|
|
|
callBackAisino(finalQueryInvoiceBack,callBackUrl, invoice.getId()); |
|
|
|
|
callBackAisino(finalQueryInvoiceBack, callBackUrl, invoice.getId()); |
|
|
|
|
} catch (InterruptedException e) { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -429,7 +428,7 @@ public class AisinoConsoleInvoiceApiZhongQiServiceImpl implements IInvoiceApiSer |
|
|
|
|
* @param callBackUrl |
|
|
|
|
* @param id |
|
|
|
|
*/ |
|
|
|
|
private void callBackAisino(InvoiceBack invoiceBack,String callBackUrl, Long id) { |
|
|
|
|
private void callBackAisino(InvoiceBack invoiceBack, String callBackUrl, Long id) { |
|
|
|
|
|
|
|
|
|
// TODO: 2023/10/27 回调处理
|
|
|
|
|
|
|
|
|
@ -451,21 +450,21 @@ public class AisinoConsoleInvoiceApiZhongQiServiceImpl implements IInvoiceApiSer |
|
|
|
|
log.info("【控制台】发票回调接口,发送数据结束,id={},接口返回信息={}", id, result); |
|
|
|
|
|
|
|
|
|
cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(result); |
|
|
|
|
if(jsonObject != null){ |
|
|
|
|
String status = jsonObject.get("Result") != null ? jsonObject.get("Result").toString():""; |
|
|
|
|
String message = jsonObject.get("Message")!= null ? jsonObject.get("Message").toString():""; |
|
|
|
|
if (jsonObject != null) { |
|
|
|
|
String status = jsonObject.get("Result") != null ? jsonObject.get("Result").toString() : ""; |
|
|
|
|
String message = jsonObject.get("Message") != null ? jsonObject.get("Message").toString() : ""; |
|
|
|
|
|
|
|
|
|
if("0000".equals(status)){ |
|
|
|
|
if ("0000".equals(status)) { |
|
|
|
|
invoiceBack.setStatus("1"); |
|
|
|
|
invoiceBack.setBackMsg(message); |
|
|
|
|
invoiceBackMapper.updateInvoiceBack(invoiceBack); |
|
|
|
|
}else if("9999".equals(status)){ |
|
|
|
|
} else if ("9999".equals(status)) { |
|
|
|
|
invoiceBack.setStatus("3"); |
|
|
|
|
invoiceBack.setBackMsg(message); |
|
|
|
|
invoiceBackMapper.updateInvoiceBack(invoiceBack); |
|
|
|
|
}else { |
|
|
|
|
} else { |
|
|
|
|
invoiceBack.setStatus("2"); |
|
|
|
|
invoiceBack.setBackMsg(status+message); |
|
|
|
|
invoiceBack.setBackMsg(status + message); |
|
|
|
|
invoiceBackMapper.updateInvoiceBack(invoiceBack); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -889,7 +888,7 @@ public class AisinoConsoleInvoiceApiZhongQiServiceImpl implements IInvoiceApiSer |
|
|
|
|
String fjh = companyserviceDetailList.get(0).getFjh(); |
|
|
|
|
|
|
|
|
|
// 组装报文
|
|
|
|
|
AisinoConsoleInvoiceRedDownloadDTO downloadDTO = BeanUtil.copyProperties(downloadRedInfoDTO,AisinoConsoleInvoiceRedDownloadDTO.class); |
|
|
|
|
AisinoConsoleInvoiceRedDownloadDTO downloadDTO = BeanUtil.copyProperties(downloadRedInfoDTO, AisinoConsoleInvoiceRedDownloadDTO.class); |
|
|
|
|
downloadDTO.setYQZT("N"); |
|
|
|
|
downloadDTO.setXXBFW("0"); |
|
|
|
|
downloadDTO.setPAGENO("1"); |
|
|
|
@ -924,7 +923,65 @@ public class AisinoConsoleInvoiceApiZhongQiServiceImpl implements IInvoiceApiSer |
|
|
|
|
throw new JianshuiServiceException(ajaxResult.getMsg()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
cn.hutool.json.JSONObject resultJSON = JSONUtil.parseObj(ajaxResult.get("data")); |
|
|
|
|
/** sb控制台和文档不一样*/ |
|
|
|
|
String retdata = ajaxResult.get("data") != null ? ajaxResult.get("data").toString() : ""; |
|
|
|
|
if (StrUtil.isEmpty(retdata)) { |
|
|
|
|
return new HXResponse("9999", "下载失败"); |
|
|
|
|
} |
|
|
|
|
String FPXT_COM_OUTPUT = JSONUtil.parseObj(retdata).get("FPXT_COM_OUTPUT") != null ? |
|
|
|
|
JSONUtil.parseObj(retdata).get("FPXT_COM_OUTPUT").toString() : ""; |
|
|
|
|
if (StrUtil.isEmpty(retdata)) { |
|
|
|
|
return new HXResponse("9999", "下载失败"); |
|
|
|
|
} |
|
|
|
|
String data = JSONUtil.parseObj(FPXT_COM_OUTPUT).get("DATA") != null ? |
|
|
|
|
JSONUtil.parseObj(FPXT_COM_OUTPUT).get("DATA").toString() : ""; |
|
|
|
|
|
|
|
|
|
if (StrUtil.isNotEmpty(data)) { |
|
|
|
|
System.out.println("存在"); |
|
|
|
|
System.out.println(data); |
|
|
|
|
if (StrUtil.isNotEmpty(data)) { |
|
|
|
|
// Map<String, Object> map = new HashMap<>();
|
|
|
|
|
data = Base64.decodeStr(data, "GB2312"); |
|
|
|
|
|
|
|
|
|
if (data.indexOf("<DATA>") != -1 && data.indexOf("</DATA>") != -1) { |
|
|
|
|
String dataChild = data.substring(data.indexOf("<DATA>") + 6, data.indexOf("</DATA>")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cn.hutool.json.JSONObject dataChildJson = JSONUtil.parseObj(dataChild); |
|
|
|
|
String RedInvReqBill = dataChildJson.get("RedInvReqBill").toString(); |
|
|
|
|
|
|
|
|
|
// TODO: 2023/11/4 这里处理
|
|
|
|
|
// cn.hutool.json.JSONArray jsonArray = JSONUtil.parseArray(RedInvReqBill);
|
|
|
|
|
|
|
|
|
|
cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(RedInvReqBill); |
|
|
|
|
JSONArray jsonArray1 = new JSONArray(); |
|
|
|
|
jsonArray1.add(jsonObject); |
|
|
|
|
|
|
|
|
|
// 拿到最终报文
|
|
|
|
|
// List<DownloadJdcVO> downloadJdcVOList = BeanUtil.copyToList(jsonArray, DownloadJdcVO.class);
|
|
|
|
|
List<DownloadJdcVO> downloadJdcVOList = BeanUtil.copyToList(jsonArray1, DownloadJdcVO.class); |
|
|
|
|
|
|
|
|
|
// 解析
|
|
|
|
|
List<Redinfo> red = null; |
|
|
|
|
try { |
|
|
|
|
red = parseRedinfo(downloadJdcVOList); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.info("红字信息表税局解密错误:{}", e); |
|
|
|
|
return new HXResponse("9999", "系统异常!!!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return new HXResponse("0000", red); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return new HXResponse("9999", "系统错误!"); |
|
|
|
|
|
|
|
|
|
// ajaxResult.get("data") != null ? JSONUtil.parseObj(ajaxResult.get("data")).get("FPXT_COM_OUTPUT")
|
|
|
|
|
|
|
|
|
|
/* cn.hutool.json.JSONObject resultJSON = JSONUtil.parseObj(ajaxResult.get("data")); |
|
|
|
|
String retcode = resultJSON.get("retcode") != null ? resultJSON.get("retcode").toString() : ""; |
|
|
|
|
String retmsg = resultJSON.get("retmsg") != null ? resultJSON.get("retmsg").toString() : ""; |
|
|
|
|
String retdata = resultJSON.get("retdata") != null ? resultJSON.get("retdata").toString() : ""; |
|
|
|
@ -971,16 +1028,53 @@ public class AisinoConsoleInvoiceApiZhongQiServiceImpl implements IInvoiceApiSer |
|
|
|
|
return new HXResponse("9999",retmsg); |
|
|
|
|
}else{ |
|
|
|
|
return new HXResponse("9999",retmsg); |
|
|
|
|
} |
|
|
|
|
}*/ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) { |
|
|
|
|
String aa = "{\"ReqBillNo\":\"661824626856231102101257\",\"ResBillNo\":4109222311000083,\"StatusDM\":\"TZD0000\",\"StatusMC\":\"审核通过\",\"BillType\":0,\"TypeCode\":\"0000000000\",\"InvNo\":\"00000000\",\"Szlb\":1,\"IsMutiRate\":0,\"Date\":\"2023-11-02\",\"BuyerName\":\"河南首发汽车销售服务有限公司\",\"BuyTaxCode\":\"91410922MA455KT3X6\",\"BuyerAdd\":\"\",\"BuyerBank\":\"\",\"SellerName\":\"中国重汽集团济南商用车有限公司\",\"SellTaxCode\":\"9137010072624213XP\",\"Amount\":-246902.65,\"TaxRate\":0.13,\"Tax\":-32097.35,\"ReqMemo\":\"Y\",\"SPBMBBH\":50,\"SLBZ\":0,\"YDDK\":\"\",\"DKBDBS\":\"\",\"Tspz\":\"\",\"Xhqdbz\":\"N\",\"RedInvReqBillMx\":{\"GoodsMx\":{\"GoodsName\":\"*机动车*销售折让\",\"GoodsUnit\":\"\",\"GoodsPrice\":\"\",\"GoodsTaxRate\":0.13,\"GoodsGgxh\":\"\",\"GoodsNum\":\"\",\"GoodsJE\":-246902.65,\"GoodsSE\":-32097.35,\"HS_BZ\":\"N\",\"SPBM\":1090305040000000000,\"QYSPBM\":\"004\",\"SYYHZCBZ\":0,\"YHZC\":\"\",\"LSLBZ\":\"\"}}}"; |
|
|
|
|
cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(aa); |
|
|
|
|
JSONArray jsonArray1 = new JSONArray(); |
|
|
|
|
jsonArray1.add(jsonObject); |
|
|
|
|
|
|
|
|
|
// 拿到最终报文
|
|
|
|
|
// List<DownloadJdcVO> downloadJdcVOList = BeanUtil.copyToList(jsonArray, DownloadJdcVO.class);
|
|
|
|
|
List<DownloadJdcVO> downloadJdcVOList = BeanUtil.copyToList(jsonArray1, DownloadJdcVO.class); |
|
|
|
|
|
|
|
|
|
// 解析
|
|
|
|
|
List<Redinfo> redinfoList = null; |
|
|
|
|
try { |
|
|
|
|
redinfoList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
for (DownloadJdcVO downloadJdcVO : downloadJdcVOList) { |
|
|
|
|
RedinfoCopyAisinoVO redinfoCopyAisinoVO = BeanUtil.copyProperties(downloadJdcVO, RedinfoCopyAisinoVO.class); |
|
|
|
|
|
|
|
|
|
// 明细处理
|
|
|
|
|
if (!CollectionUtils.isEmpty(downloadJdcVO.getRedInvReqBillMx()) && !CollectionUtils.isEmpty(downloadJdcVO.getRedInvReqBillMx().get(0).getGoodsMx())) { |
|
|
|
|
List<DownloadJdcDetailItemVO> downloadJdcDetailItemVOS = downloadJdcVO.getRedInvReqBillMx().get(0).getGoodsMx(); |
|
|
|
|
List<RedinfodetailAisinoVO> redinfodetailAisinoVOList = BeanUtil.copyToList(downloadJdcDetailItemVOS, RedinfodetailAisinoVO.class); |
|
|
|
|
redinfoCopyAisinoVO.setRedinfodetailList(redinfodetailAisinoVOList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 返回转换
|
|
|
|
|
Redinfo redinfo = BeanUtil.copyProperties(BeanToMapUtils.fastJsonBean2Map(redinfoCopyAisinoVO), Redinfo.class); |
|
|
|
|
redinfoList.add(redinfo); |
|
|
|
|
} |
|
|
|
|
System.out.println(redinfoList); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.info("红字信息表税局解密错误:{}", e); |
|
|
|
|
// return new HXResponse("9999", "系统异常!!!");
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// return new HXResponse("0000", red);
|
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* @author kk |
|
|
|
|
* @date 15:25 |
|
|
|
|
* @param: [downloadJdcVOList] |
|
|
|
|
* @return: |
|
|
|
|
* 红字信息表下载报文转换 |
|
|
|
|
*/ |
|
|
|
|
* @author kk |
|
|
|
|
* @date 15:25 |
|
|
|
|
* @param: [downloadJdcVOList] |
|
|
|
|
* @return: 红字信息表下载报文转换 |
|
|
|
|
*/ |
|
|
|
|
private List<Redinfo> parseRedinfo(List<DownloadJdcVO> downloadJdcVOList) { |
|
|
|
|
|
|
|
|
|
List<Redinfo> redinfoList = new ArrayList<>(); |
|
|
|
@ -989,9 +1083,9 @@ public class AisinoConsoleInvoiceApiZhongQiServiceImpl implements IInvoiceApiSer |
|
|
|
|
RedinfoCopyAisinoVO redinfoCopyAisinoVO = BeanUtil.copyProperties(downloadJdcVO, RedinfoCopyAisinoVO.class); |
|
|
|
|
|
|
|
|
|
// 明细处理
|
|
|
|
|
if(!CollectionUtils.isEmpty(downloadJdcVO.getRedInvReqBillMx()) && !CollectionUtils.isEmpty(downloadJdcVO.getRedInvReqBillMx().get(0).getGoodsMx())){ |
|
|
|
|
if (!CollectionUtils.isEmpty(downloadJdcVO.getRedInvReqBillMx()) && !CollectionUtils.isEmpty(downloadJdcVO.getRedInvReqBillMx().get(0).getGoodsMx())) { |
|
|
|
|
List<DownloadJdcDetailItemVO> downloadJdcDetailItemVOS = downloadJdcVO.getRedInvReqBillMx().get(0).getGoodsMx(); |
|
|
|
|
List<RedinfodetailAisinoVO> redinfodetailAisinoVOList = BeanUtil.copyToList(downloadJdcDetailItemVOS,RedinfodetailAisinoVO.class); |
|
|
|
|
List<RedinfodetailAisinoVO> redinfodetailAisinoVOList = BeanUtil.copyToList(downloadJdcDetailItemVOS, RedinfodetailAisinoVO.class); |
|
|
|
|
redinfoCopyAisinoVO.setRedinfodetailList(redinfodetailAisinoVOList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1151,10 +1245,10 @@ public class AisinoConsoleInvoiceApiZhongQiServiceImpl implements IInvoiceApiSer |
|
|
|
|
@Override |
|
|
|
|
public HXResponse exportVehicleInvoice(JSONObject decryptResult, Companyservice companyservice) { |
|
|
|
|
|
|
|
|
|
ExportVehicleDTO exportVehicleDTO = BeanUtil.copyProperties(decryptResult,ExportVehicleDTO.class); |
|
|
|
|
ExportVehicleDTO exportVehicleDTO = BeanUtil.copyProperties(decryptResult, ExportVehicleDTO.class); |
|
|
|
|
|
|
|
|
|
if(BeanUtil.isEmpty(exportVehicleDTO)){ |
|
|
|
|
return new HXResponse("9999","请求参数为空!"); |
|
|
|
|
if (BeanUtil.isEmpty(exportVehicleDTO)) { |
|
|
|
|
return new HXResponse("9999", "请求参数为空!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 机动车加密导出路径配置
|
|
|
|
@ -1169,13 +1263,13 @@ public class AisinoConsoleInvoiceApiZhongQiServiceImpl implements IInvoiceApiSer |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("【销项发票】【总部控制台接口】【机动车加密】机动车加密文件导出请求异常,请求报文{},销方信息{}", JSONUtil.parse(decryptResult).toString(), JSONObject.toJSONString(companyservice)); |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
return new HXResponse("9999","系统异常!"); |
|
|
|
|
return new HXResponse("9999", "系统异常!"); |
|
|
|
|
} |
|
|
|
|
log.info("【销项发票】【总部控制台发票】机动车加密文件导出结果{}", ajaxResult.toString()); |
|
|
|
|
|
|
|
|
|
//返回报文解析
|
|
|
|
|
if (ajaxResult.isError()) { |
|
|
|
|
return new HXResponse("9999",ajaxResult.getMsg()); |
|
|
|
|
return new HXResponse("9999", ajaxResult.getMsg()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
cn.hutool.json.JSONObject resultJSON = JSONUtil.parseObj(ajaxResult.get("data")); |
|
|
|
@ -1189,7 +1283,7 @@ public class AisinoConsoleInvoiceApiZhongQiServiceImpl implements IInvoiceApiSer |
|
|
|
|
|
|
|
|
|
if (secretIdProp == null || StrUtil.isEmpty(secretIdProp.getValue())) { |
|
|
|
|
log.info("【销项发票】【总部控制台发票-机动车加密】推送nginx地址未配置!aisino_nginx_url"); |
|
|
|
|
return new HXResponse("9999","推送中间件地址未配置!"); |
|
|
|
|
return new HXResponse("9999", "推送中间件地址未配置!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String downloadUrl = secretIdProp.getValue(); |
|
|
|
@ -1197,7 +1291,7 @@ public class AisinoConsoleInvoiceApiZhongQiServiceImpl implements IInvoiceApiSer |
|
|
|
|
cn.hutool.json.JSONObject queryDto = JSONUtil.parseObj(json); |
|
|
|
|
if (queryDto == null) { |
|
|
|
|
log.info("【销项发票】【总部控制台发票-机动车加密】查询条件未获取到!"); |
|
|
|
|
return new HXResponse("9999","查询条件未获取到!"); |
|
|
|
|
return new HXResponse("9999", "查询条件未获取到!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String indexPage = null; |
|
|
|
@ -1205,7 +1299,7 @@ public class AisinoConsoleInvoiceApiZhongQiServiceImpl implements IInvoiceApiSer |
|
|
|
|
indexPage = HttpUtil.get(downloadUrl); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.info("【销项发票】【总部控制台发票-机动车加密】{}", e); |
|
|
|
|
return new HXResponse("9999","中间件读取失败!"); |
|
|
|
|
return new HXResponse("9999", "中间件读取失败!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String startDate = queryDto.get("KSRQ") != null ? queryDto.get("KSRQ").toString().replace("-", ".") : ""; |
|
|
|
@ -1244,12 +1338,12 @@ public class AisinoConsoleInvoiceApiZhongQiServiceImpl implements IInvoiceApiSer |
|
|
|
|
// InputStream is = new ByteArrayInputStream(fileStream.getBytes());
|
|
|
|
|
|
|
|
|
|
CompanyserviceProp qyjc = companyserviceProp.selectPropByKey(companyservice.getCompanyid(), "aisino_qyjc"); |
|
|
|
|
if(qyjc == null || StrUtil.isEmpty(qyjc.getValue())){ |
|
|
|
|
return new HXResponse("9999","重汽推送企业简称未设置!"); |
|
|
|
|
if (qyjc == null || StrUtil.isEmpty(qyjc.getValue())) { |
|
|
|
|
return new HXResponse("9999", "重汽推送企业简称未设置!"); |
|
|
|
|
} |
|
|
|
|
CompanyserviceProp zdr = companyserviceProp.selectPropByKey(companyservice.getCompanyid(), "aisino_zdr"); |
|
|
|
|
if(zdr == null || StrUtil.isEmpty(zdr.getValue())){ |
|
|
|
|
return new HXResponse("9999","重汽推送制单人未设置!"); |
|
|
|
|
if (zdr == null || StrUtil.isEmpty(zdr.getValue())) { |
|
|
|
|
return new HXResponse("9999", "重汽推送制单人未设置!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 调用重汽的推送接口
|
|
|
|
@ -1260,12 +1354,12 @@ public class AisinoConsoleInvoiceApiZhongQiServiceImpl implements IInvoiceApiSer |
|
|
|
|
|
|
|
|
|
CompanyserviceProp pushUrl = companyserviceProp.selectPropByKey(companyservice.getCompanyid(), "aisino_upload_url"); |
|
|
|
|
if (pushUrl == null || StrUtil.isEmpty(pushUrl.getValue())) { |
|
|
|
|
return new HXResponse("9999","重汽推送机动车地址未设置!"); |
|
|
|
|
return new HXResponse("9999", "重汽推送机动车地址未设置!"); |
|
|
|
|
} |
|
|
|
|
String retCode = null; |
|
|
|
|
String retMsg = null; |
|
|
|
|
try { |
|
|
|
|
log.info("【机动车加密接口推送】请求内容:{}",paramMap); |
|
|
|
|
log.info("【机动车加密接口推送】请求内容:{}", paramMap); |
|
|
|
|
// String result = HttpUtil.post(pushUrl.getValue(), paramMap);
|
|
|
|
|
String result = HttpRequest.post(pushUrl.getValue()) |
|
|
|
|
.form(paramMap)//表单内容
|
|
|
|
@ -1276,7 +1370,7 @@ public class AisinoConsoleInvoiceApiZhongQiServiceImpl implements IInvoiceApiSer |
|
|
|
|
retCode = jsonObject.get("retCode") != null ? jsonObject.get("retCode").toString() : ""; |
|
|
|
|
retMsg = jsonObject.get("retMsg") != null ? jsonObject.get("retMsg").toString() : ""; |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.info("【机动车加密接口推送】超时,{}",e); |
|
|
|
|
log.info("【机动车加密接口推送】超时,{}", e); |
|
|
|
|
return new HXResponse("9999", "推送接口超时!"); |
|
|
|
|
} |
|
|
|
|
// 重汽返回接口信息
|
|
|
|
@ -1293,13 +1387,12 @@ public class AisinoConsoleInvoiceApiZhongQiServiceImpl implements IInvoiceApiSer |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @author kk |
|
|
|
|
* @date 17:42 |
|
|
|
|
* @param: [in] |
|
|
|
|
* @return: |
|
|
|
|
* 机动车加密导出-文件转化本地 |
|
|
|
|
*/ |
|
|
|
|
public static File stream2file (InputStream in) throws IOException { |
|
|
|
|
* @author kk |
|
|
|
|
* @date 17:42 |
|
|
|
|
* @param: [in] |
|
|
|
|
* @return: 机动车加密导出-文件转化本地 |
|
|
|
|
*/ |
|
|
|
|
public static File stream2file(InputStream in) throws IOException { |
|
|
|
|
final File tempFile = File.createTempFile(PREFIX, SUFFIX); |
|
|
|
|
tempFile.deleteOnExit(); |
|
|
|
|
try (FileOutputStream out = new FileOutputStream(tempFile)) { |
|
|
|
|