|
|
|
@ -25,8 +25,10 @@ import com.dxhy.order.consumer.modules.ticketpool.service.PushTicketPoolService; |
|
|
|
|
import com.dxhy.order.consumer.openapi.protocol.CommonRequestParam; |
|
|
|
|
import com.dxhy.order.consumer.openapi.protocol.Response; |
|
|
|
|
import com.dxhy.order.consumer.openapi.protocol.order.*; |
|
|
|
|
import com.dxhy.order.consumer.openapi.protocol.po.EsOutput; |
|
|
|
|
import com.dxhy.order.consumer.openapi.protocol.po.IsInput; |
|
|
|
|
import com.dxhy.order.consumer.openapi.protocol.po.PoCommonRequestParam; |
|
|
|
|
import com.dxhy.order.consumer.openapi.protocol.po.PoCommonResponseParam; |
|
|
|
|
import com.dxhy.order.consumer.openapi.protocol.po.generateinvoicepush.sap.FpkjtsMxSap; |
|
|
|
|
import com.dxhy.order.consumer.openapi.protocol.po.generateinvoicepush.sap.FpkjtsReqSap; |
|
|
|
|
import com.dxhy.order.consumer.openapi.protocol.po.voidinvoicepush.sap.FpzftsReqSap; |
|
|
|
@ -61,10 +63,7 @@ import com.dxhy.order.model.ofd.OfdToPdfResponse; |
|
|
|
|
import com.dxhy.order.model.qd.OrderInfoQd; |
|
|
|
|
import com.dxhy.order.model.queue.*; |
|
|
|
|
import com.dxhy.order.model.queue.jdwj.JdwjMqData; |
|
|
|
|
import com.dxhy.order.utils.CommonUtils; |
|
|
|
|
import com.dxhy.order.utils.HttpUtils; |
|
|
|
|
import com.dxhy.order.utils.JsonUtils; |
|
|
|
|
import com.dxhy.order.utils.NsrsbhUtils; |
|
|
|
|
import com.dxhy.order.utils.*; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
@ -389,7 +388,7 @@ public class PushInvoiceServiceImpl implements PushInvoiceService { |
|
|
|
|
String result = ""; |
|
|
|
|
if (ConfigurerInfo.INTERFACE_VERSION_V5.equals(pushInfo.getVersionIdent()) |
|
|
|
|
|| ConfigurerInfo.INTERFACE_VERSION_V6.equals(pushInfo.getVersionIdent())) { |
|
|
|
|
result = HttpUtils.doPost(pushInfo.getPushUrl(), JsonUtils.getInstance().toJsonString(requestMap)); |
|
|
|
|
result = HttpUtils.sendPo(pushInfo.getPushUrl(), fptsParam,baseServiceConfig.getPoUserName(),baseServiceConfig.getPoPassword()); |
|
|
|
|
} else { |
|
|
|
|
result = HttpUtils.doPost(pushInfo.getPushUrl(), requestMap); |
|
|
|
|
} |
|
|
|
@ -400,6 +399,59 @@ public class PushInvoiceServiceImpl implements PushInvoiceService { |
|
|
|
|
if (ConfigurerInfo.INTERFACE_VERSION_V5.equals(pushInfo.getVersionIdent()) |
|
|
|
|
|| ConfigurerInfo.INTERFACE_VERSION_V6.equals(pushInfo.getVersionIdent())) { |
|
|
|
|
DxhyInterfaceResponse dxhyInterfaceResponse = JsonUtils.getInstance().parseObject(result, DxhyInterfaceResponse.class); |
|
|
|
|
if (OrderInfoEnum.INTERFACE_TYPE_INVOICE_PUSH_STATUS_1.getKey().equals(fpTsMqData.getPushType())) { |
|
|
|
|
if(OrderInfoEnum.SYS_SOURCE_SAP.getKey().equals(xtly)){ |
|
|
|
|
PoCommonResponseParam poCommonResponseParam = JsonUtils.getInstance().parseObject(result, PoCommonResponseParam.class); |
|
|
|
|
EsOutput es_output = poCommonResponseParam.getES_OUTPUT(); |
|
|
|
|
String sapkey = es_output.getSAPKEY(); |
|
|
|
|
String ztype = es_output.getZTYPE(); |
|
|
|
|
String zmessage = es_output.getZMESSAGE(); |
|
|
|
|
List<DdfptsV5> resultList = new ArrayList<>(); |
|
|
|
|
DdfptsV5 ddfptsV5 = new DdfptsV5(); |
|
|
|
|
ddfptsV5.setDDQQLSH(fpTsMqData.getFpTsMqData().getFpqqlsh()); |
|
|
|
|
ddfptsV5.setNSRSBH(""); |
|
|
|
|
if(OrderInfoContentEnum.INVOICE_ERROR_CODE_OP_S.getKey().equals(ztype)){ |
|
|
|
|
ddfptsV5.setZTDM(ConfigureConstant.STRING_000000); |
|
|
|
|
}else { |
|
|
|
|
ddfptsV5.setZTDM(ConfigureConstant.STRING_9999); |
|
|
|
|
} |
|
|
|
|
ddfptsV5.setZTXX(zmessage); |
|
|
|
|
dxhyInterfaceResponse.setReturnCode(ConfigureConstant.STRING_000000); |
|
|
|
|
dxhyInterfaceResponse.setReturnMessage("处理成功"); |
|
|
|
|
dxhyInterfaceResponse.setEncryptCode(ConfigurerInfo.ENCRYPTCODE_0); |
|
|
|
|
dxhyInterfaceResponse.setZipCode(ConfigurerInfo.ENCRYPTCODE_0); |
|
|
|
|
resultList.add(ddfptsV5); |
|
|
|
|
dxhyInterfaceResponse.setContent(Base64Encoding.encode(JsonUtils.getInstance().toJsonString(resultList))); |
|
|
|
|
}else{ |
|
|
|
|
dxhyInterfaceResponse = JsonUtils.getInstance().parseObject(result, DxhyInterfaceResponse.class); |
|
|
|
|
} |
|
|
|
|
}else if (OrderInfoEnum.INTERFACE_TYPE_INVOICE_PUSH_STATUS_2.getKey().equals(fpTsMqData.getPushType())) { |
|
|
|
|
if(OrderInfoEnum.SYS_SOURCE_SAP.getKey().equals(xtly)){ |
|
|
|
|
PoCommonResponseParam poCommonResponseParam = JsonUtils.getInstance().parseObject(result, PoCommonResponseParam.class); |
|
|
|
|
EsOutput es_output = poCommonResponseParam.getES_OUTPUT(); |
|
|
|
|
String sapkey = es_output.getSAPKEY(); |
|
|
|
|
String ztype = es_output.getZTYPE(); |
|
|
|
|
String zmessage = es_output.getZMESSAGE(); |
|
|
|
|
ZffpxxV5 zffpxxV5 = new ZffpxxV5(); |
|
|
|
|
zffpxxV5.setXHFSBH(fpTsMqData.getZfTsMqData().getNsrsbh()); |
|
|
|
|
zffpxxV5.setFPDM(fpTsMqData.getZfTsMqData().getFpdm()); |
|
|
|
|
zffpxxV5.setFPHM(fpTsMqData.getZfTsMqData().getFphm()); |
|
|
|
|
if(OrderInfoContentEnum.INVOICE_ERROR_CODE_OP_S.getKey().equals(ztype)){ |
|
|
|
|
zffpxxV5.setZTDM(ConfigureConstant.STRING_000000); |
|
|
|
|
}else { |
|
|
|
|
zffpxxV5.setZTDM(ConfigureConstant.STRING_9999); |
|
|
|
|
} |
|
|
|
|
zffpxxV5.setZTXX(zmessage); |
|
|
|
|
dxhyInterfaceResponse.setReturnCode(ConfigureConstant.STRING_000000); |
|
|
|
|
dxhyInterfaceResponse.setReturnMessage("处理成功"); |
|
|
|
|
dxhyInterfaceResponse.setEncryptCode(ConfigurerInfo.ENCRYPTCODE_0); |
|
|
|
|
dxhyInterfaceResponse.setZipCode(ConfigurerInfo.ENCRYPTCODE_0); |
|
|
|
|
dxhyInterfaceResponse.setContent(Base64Encoding.encode(JsonUtils.getInstance().toJsonString(zffpxxV5))); |
|
|
|
|
}else{ |
|
|
|
|
dxhyInterfaceResponse = JsonUtils.getInstance().parseObject(result, DxhyInterfaceResponse.class); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (ObjectUtil.isNotNull(dxhyInterfaceResponse)) { |
|
|
|
|
if (ConfigureConstant.STRING_000000.equals(dxhyInterfaceResponse.getReturnCode())) { |
|
|
|
|
CommonRequestParam commonRequestParam1 = new CommonRequestParam(); |
|
|
|
|