|
|
|
@ -3,6 +3,7 @@ package com.dxhy.order.invoice.module.invoice.service.impl; |
|
|
|
|
import cn.hutool.core.util.IdUtil; |
|
|
|
|
import cn.hutool.crypto.digest.DigestUtil; |
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
|
import com.dxhy.order.constant.ConfigureConstant; |
|
|
|
|
import com.dxhy.order.constant.OrderInfoEnum; |
|
|
|
|
import com.dxhy.order.invoice.module.invoice.service.OfdToPngSDEnergyService; |
|
|
|
|
import com.dxhy.order.model.ofd.OfdToPngResponse; |
|
|
|
@ -11,11 +12,7 @@ import lombok.extern.slf4j.Slf4j; |
|
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
|
import java.lang.reflect.Array; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.Arrays; |
|
|
|
|
import java.util.Date; |
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
@Service |
|
|
|
@ -31,11 +28,12 @@ public class OfdToPngSDEnergyServiceImpl implements OfdToPngSDEnergyService { |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public OfdToPngResponse getOfdPngBySDenergy(byte[] bytes) { |
|
|
|
|
Long timestamp = new Date().getTime(); |
|
|
|
|
Long timestamp = System.currentTimeMillis(); |
|
|
|
|
String md5Str = DigestUtil.md5Hex(timestamp + simsSalt); |
|
|
|
|
String url = yxurl + "/yxSims/ofdToImage?timestamp="+timestamp+"&md5Str="+md5Str; |
|
|
|
|
|
|
|
|
|
OfdToPngResponse ofdToPngResponse = new OfdToPngResponse(); |
|
|
|
|
ofdToPngResponse.setZTDM(ConfigureConstant.STRING_0000); |
|
|
|
|
try { |
|
|
|
|
log.info("调用影像接口ofd转png,url:{}",url); |
|
|
|
|
String rs = HttpUtils.doPostUpload(url, bytes, IdUtil.fastSimpleUUID()+".ofd"); |
|
|
|
|