|
|
|
@ -1,6 +1,7 @@ |
|
|
|
|
package com.dxhy.order.consumer.openapi.api; |
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
|
import cn.hutool.http.HttpUtil; |
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
|
import com.dxhy.order.baseservice.config.BaseServiceConfig; |
|
|
|
|
import com.dxhy.order.baseservice.module.buyer.protocol.GmfxxcxReqBO; |
|
|
|
@ -39,6 +40,7 @@ import com.dxhy.order.consumer.openapi.protocol.v6.sdenergy.MdmGmfxxtbReqBO; |
|
|
|
|
import com.dxhy.order.consumer.openapi.service.*; |
|
|
|
|
import com.dxhy.order.consumer.utils.BeanTransitionUtils; |
|
|
|
|
import com.dxhy.order.exception.OrderReceiveException; |
|
|
|
|
import com.dxhy.order.utils.HttpUtils; |
|
|
|
|
import com.dxhy.order.utils.JsonUtils; |
|
|
|
|
import io.swagger.annotations.Api; |
|
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
@ -48,6 +50,7 @@ import org.apache.commons.collections.CollectionUtils; |
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
|
import org.joda.time.DateTime; |
|
|
|
|
import org.joda.time.Duration; |
|
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
@ -55,6 +58,7 @@ import javax.servlet.http.HttpServletRequest; |
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
import java.nio.charset.StandardCharsets; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
@ -92,6 +96,8 @@ public class InvoiceRestApiV6 { |
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
private UserInfoService userInfoService; |
|
|
|
|
@Value("${jx.jxUrl}") |
|
|
|
|
private String jxUrl; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 统一SDK对外接口方法 |
|
|
|
@ -375,6 +381,13 @@ public class InvoiceRestApiV6 { |
|
|
|
|
//
|
|
|
|
|
// returnJsonString = JsonUtils.getInstance().toJsonStringNullToEmpty(respBO);
|
|
|
|
|
return returnJsonString = ""; |
|
|
|
|
}else if(ConfigurerInfo.transferTojx.equals(interfaceName)){ |
|
|
|
|
log.info("开始调用进项接口"); |
|
|
|
|
Map<String,String> headMap = new HashMap<>(); |
|
|
|
|
headMap.put("token",ConfigureConstant.POTOKEN); |
|
|
|
|
String s = HttpUtils.doPostWithHeader(jxUrl,reqStr,headMap); |
|
|
|
|
log.info("进项接口返回:{}",s); |
|
|
|
|
return s; |
|
|
|
|
} else { |
|
|
|
|
returnJsonString = ""; |
|
|
|
|
} |
|
|
|
|