推送税盘信息添加机动车判断

release
路明慧 2 years ago
parent 9ac356e637
commit 360a205889
  1. 2
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/service/impl/MakeOutAnInvoiceServiceImpl.java
  2. 17
      order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/FangGeInterfaceServiceImpl.java
  3. 10
      order-management-invoice/src/main/java/com/dxhy/order/invoice/config/InvoiceConfig.java
  4. 19
      order-management-invoice/src/main/java/com/dxhy/order/invoice/module/fangge/service/impl/FangGeServiceImpl.java
  5. 4
      order-management-invoice/src/main/java/com/dxhy/order/invoice/module/invoice/service/impl/UnifyServiceImpl.java

@ -616,7 +616,7 @@ public class MakeOutAnInvoiceServiceImpl implements MakeOutAnInvoiceService {
//方格开票特殊处理 //方格开票特殊处理
if (CommonUtils.judgeIsFgTerminalOld(terminalCode,fgSkKpShList,sh) && (OrderInfoEnum.ORDER_INVOICE_TYPE_12.getKey().equals(orderInfo.getFpzlDm())||OrderInfoEnum.ORDER_INVOICE_TYPE_42.getKey().equals(orderInfo.getFpzlDm()))) { if (CommonUtils.judgeIsFgTerminalOld(terminalCode,fgSkKpShList,sh)) {
for (List<InvoiceBatchRequestItem> invoiceBatchRequestItem1 : insertBatchItem) { for (List<InvoiceBatchRequestItem> invoiceBatchRequestItem1 : insertBatchItem) {
for (InvoiceBatchRequestItem batchRequestItem : invoiceBatchRequestItem1) { for (InvoiceBatchRequestItem batchRequestItem : invoiceBatchRequestItem1) {
/** /**

@ -2250,7 +2250,7 @@ public class FangGeInterfaceServiceImpl implements FangGeInterfaceService {
String[] fgSkKpList = fgSkKpShList.split(ConfigureConstant.STRING_POINT2); String[] fgSkKpList = fgSkKpShList.split(ConfigureConstant.STRING_POINT2);
for (String fgSkKp : fgSkKpList) { for (String fgSkKp : fgSkKpList) {
if (sqZcxxParam.getNSRSBH().equals(fgSkKp)) { if (sqZcxxParam.getNSRSBH().equals(fgSkKp)) {
url = invoiceConfig.configSqZcxxFg2(); url = invoiceConfig.configSqZcxxFgJDC();
} }
} }
} }
@ -2356,7 +2356,20 @@ public class FangGeInterfaceServiceImpl implements FangGeInterfaceService {
} }
// 调用税控接口,同步税盘信息 // 调用税控接口,同步税盘信息
ResponseBaseBean result = HttpInvoiceRequestUtilFg.tbSpxx(invoiceConfig.configTbSpxxFg(), tbSpxxParam, taxEquipmentInfo.getSksbCode()); String url = invoiceConfig.configTbSpxxFg();
String fgSkKpShList = baseServiceConfig.getFgSkKpShList();
if (StringUtils.isNotBlank(fgSkKpShList) && StringUtils.isNotBlank(nsrsbh)) {
String[] fgSkKpList = fgSkKpShList.split(ConfigureConstant.STRING_POINT2);
for (String fgSkKp : fgSkKpList) {
if (nsrsbh.equals(fgSkKp)) {
url = invoiceConfig.configTbSpxxFgJDC();
}
}
}
ResponseBaseBean result = HttpInvoiceRequestUtilFg.tbSpxx(url, tbSpxxParam, taxEquipmentInfo.getSksbCode());
if (OrderInfoContentEnum.INVOICE_STAT_SUCCESS.getKey().equals(result.getCode())) { if (OrderInfoContentEnum.INVOICE_STAT_SUCCESS.getKey().equals(result.getCode())) {
//同步信息成功 //同步信息成功
log.info("同步税盘信息成功"); log.info("同步税盘信息成功");

@ -388,7 +388,7 @@ public class InvoiceConfig {
return interfaceA9BusinessUrl + "/invoice/business/v1.0/queryNsrXnsbxx"; return interfaceA9BusinessUrl + "/invoice/business/v1.0/queryNsrXnsbxx";
} }
public String configQueryNsrXnsbxx2() { public String configQueryNsrXnsbxxJDC() {
return interfaceJdcBusinessUrl + "/invoice/business/v1.0/queryNsrXnsbxx"; return interfaceJdcBusinessUrl + "/invoice/business/v1.0/queryNsrXnsbxx";
} }
@ -543,6 +543,10 @@ public class InvoiceConfig {
public String configTbSpxxFg() { public String configTbSpxxFg() {
return interfaceA9BusinessUrl + "/invoice/business/v1.0/tbSpxx"; return interfaceA9BusinessUrl + "/invoice/business/v1.0/tbSpxx";
} }
public String configTbSpxxFgJDC() {
return interfaceJdcBusinessUrl + "/invoice/business/v1.0/tbSpxx";
}
/** /**
* 调用税控生成pdf地址 * 调用税控生成pdf地址
@ -561,7 +565,7 @@ public class InvoiceConfig {
public String configSqZcxxFg() { public String configSqZcxxFg() {
return interfaceA9BusinessUrl + "/invoice/business/v1.0/sqZcxx"; return interfaceA9BusinessUrl + "/invoice/business/v1.0/sqZcxx";
} }
public String configSqZcxxFg2() { public String configSqZcxxFgJDC() {
return interfaceJdcBusinessUrl + "/invoice/business/v1.0/sqZcxx"; return interfaceJdcBusinessUrl + "/invoice/business/v1.0/sqZcxx";
} }
@ -1217,7 +1221,7 @@ public class InvoiceConfig {
} }
public String configGetDiscInfoFg2() { public String configGetDiscInfoFgJDC() {
return interfaceJdcBusinessUrl + "/invoice/business/v1.0/queryDiscinfo"; return interfaceJdcBusinessUrl + "/invoice/business/v1.0/queryDiscinfo";
} }
} }

@ -4,6 +4,7 @@ import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.RandomUtil; import cn.hutool.core.util.RandomUtil;
import com.dxhy.order.baseservice.config.BaseServiceConfig;
import com.dxhy.order.constant.*; import com.dxhy.order.constant.*;
import com.dxhy.order.model.InvoicePrintInfo; import com.dxhy.order.model.InvoicePrintInfo;
import com.dxhy.order.model.OrderInvoiceInfo; import com.dxhy.order.model.OrderInvoiceInfo;
@ -74,6 +75,9 @@ public class FangGeServiceImpl implements FangGeService {
@Resource @Resource
private FangGeService fangGeService; private FangGeService fangGeService;
@Resource
private BaseServiceConfig baseServiceConfig;
@Override @Override
public void updateUploadRedInvoice(SpecialInvoiceReversalEntity entity) { public void updateUploadRedInvoice(SpecialInvoiceReversalEntity entity) {
specialInvoiceReversalMapper.updateByPrimaryKeySelective(entity); specialInvoiceReversalMapper.updateByPrimaryKeySelective(entity);
@ -279,7 +283,20 @@ public class FangGeServiceImpl implements FangGeService {
spxxParams.add(spxxParam); spxxParams.add(spxxParam);
tbSpxxParam.setJSPXX(spxxParams); tbSpxxParam.setJSPXX(spxxParams);
// 调用税控接口,同步税盘信息 // 调用税控接口,同步税盘信息
HttpInvoiceRequestUtilFg.tbSpxx(invoiceConfig.configTbSpxxFg(), tbSpxxParam, OrderInfoEnum.TAX_EQUIPMENT_FGHX.getKey()); String url = invoiceConfig.configTbSpxxFg();
String fgSkKpShList = baseServiceConfig.getFgSkKpShList();
if (StringUtils.isNotBlank(fgSkKpShList) && StringUtils.isNotBlank(xhfNsrsbh)) {
String[] fgSkKpList = fgSkKpShList.split(ConfigureConstant.STRING_POINT2);
for (String fgSkKp : fgSkKpList) {
if (xhfNsrsbh.equals(fgSkKp)) {
url = invoiceConfig.configTbSpxxFgJDC();
}
}
}
HttpInvoiceRequestUtilFg.tbSpxx(url, tbSpxxParam, OrderInfoEnum.TAX_EQUIPMENT_FGHX.getKey());
registrationCode.setSpzt(spzt); registrationCode.setSpzt(spzt);
saveCodeToRedis(registrationCode); saveCodeToRedis(registrationCode);
log.warn("{}同步税盘状态成功,当前税盘状态为:{}(0:在线,1:离线),税号:{},机器编号:{}", LOGGER_MSG, spzt, xhfNsrsbh, jqbh); log.warn("{}同步税盘状态成功,当前税盘状态为:{}(0:在线,1:离线),税号:{},机器编号:{}", LOGGER_MSG, spzt, xhfNsrsbh, jqbh);

@ -247,7 +247,7 @@ public class UnifyServiceImpl implements UnifyService {
String[] fgSkKpList = fgSkKpShList.split(ConfigureConstant.STRING_POINT2); String[] fgSkKpList = fgSkKpShList.split(ConfigureConstant.STRING_POINT2);
for (String fgSkKp : fgSkKpList) { for (String fgSkKp : fgSkKpList) {
if (nsrsbh.equals(fgSkKp)) { if (nsrsbh.equals(fgSkKp)) {
realUrl = invoiceConfig.configQueryNsrXnsbxx2(); realUrl = invoiceConfig.configQueryNsrXnsbxxJDC();
} }
} }
} }
@ -766,7 +766,7 @@ public class UnifyServiceImpl implements UnifyService {
String[] fgSkKpList = fgSkKpShList.split(ConfigureConstant.STRING_POINT2); String[] fgSkKpList = fgSkKpShList.split(ConfigureConstant.STRING_POINT2);
for (String fgSkKp : fgSkKpList) { for (String fgSkKp : fgSkKpList) {
if (nsrsbh.equals(fgSkKp)) { if (nsrsbh.equals(fgSkKp)) {
url = invoiceConfig.configGetDiscInfoFg2(); url = invoiceConfig.configGetDiscInfoFgJDC();
} }
} }
} }

Loading…
Cancel
Save