Merge remote-tracking branch 'origin/release' into release

release
zhenghaiyang@ele-cloud.com 2 years ago
commit a57eabcb90
  1. 16
      order-management-common/src/main/java/com/dxhy/order/model/OrderInvoiceInfo.java
  2. 47
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/PushInvoiceServiceImpl.java
  3. 11
      order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/api/InvoiceRestApiV6.java
  4. 4
      order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/InterfaceServiceV3.java
  5. 44
      order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/InterfaceServiceImplV3.java
  6. 8
      order-management-invoice/src/main/java/com/dxhy/order/invoice/module/invoice/dao/OrderInvoiceInfoMapper.java
  7. 3
      order-management-invoice/src/main/java/com/dxhy/order/invoice/module/invoice/service/OrderInvoiceInfoService.java
  8. 5
      order-management-invoice/src/main/java/com/dxhy/order/invoice/module/invoice/service/impl/OrderInvoiceInfoServiceImpl.java
  9. 41
      order-management-invoice/src/main/resources/mybatis/mapper/OrderInvoiceInfoMapper.xml

@ -327,6 +327,20 @@ public class OrderInvoiceInfo implements Serializable {
* 税控错误描述 * 税控错误描述
*/ */
private String skcwms; private String skcwms;
/**
* Open Text Id
*/
private String docuId; private String docuId;
/**
* 凭证号
*/
private String voucherNo;
/**
* 过账日期
*/
private String accountDate;
/**
* 报账单号
*/
private String checkNo;
} }

@ -157,6 +157,19 @@ public class PushInvoiceServiceImpl implements PushInvoiceService {
@Resource @Resource
private BaseServiceConfig baseServiceConfig; private BaseServiceConfig baseServiceConfig;
private final static Map smMap = new HashMap() {{
put(new BigDecimal("0"), "X0");
put(new BigDecimal("0.16"), "X1");
put(new BigDecimal("0.13"), "X2");
put(new BigDecimal("0.1"), "X3");
put(new BigDecimal("0.09"), "X4");
put(new BigDecimal("0.06"), "X5");
put(new BigDecimal("0.05"), "X6");
put(new BigDecimal("0.03"), "X7");
put(new BigDecimal("0.02"), "X8");
put(new BigDecimal("0.01"), "X9");
}};
@Override @Override
public R pushRouting(String pushMsg) { public R pushRouting(String pushMsg) {
R r = new R(); R r = new R();
@ -180,11 +193,8 @@ public class PushInvoiceServiceImpl implements PushInvoiceService {
if (OrderInfoEnum.ORDER_STATUS_5.getKey().equals(orderProcessInfo.getDdzt()) || OrderInfoEnum.ORDER_STATUS_7.getKey().equals(orderProcessInfo.getDdzt())) { if (OrderInfoEnum.ORDER_STATUS_5.getKey().equals(orderProcessInfo.getDdzt()) || OrderInfoEnum.ORDER_STATUS_7.getKey().equals(orderProcessInfo.getDdzt())) {
//判断订单来源,如果是接口开票的进行推送,其他不进行推送 //判断是否有报账单号,有则回推,没有不回推
boolean pushEnterprise = fpTsMqData.isForcePush() || (OrderInfoEnum.ORDER_SOURCE_2.getKey().equals(orderProcessInfo.getDdly()) || boolean pushEnterprise = StrUtil.isNotBlank(orderProcessInfo.getBzdh());
OrderInfoEnum.ORDER_SOURCE_3.getKey().equals(orderProcessInfo.getDdly()) ||
OrderInfoEnum.ORDER_SOURCE_5.getKey().equals(orderProcessInfo.getDdly()) ||
OrderInfoEnum.ORDER_SOURCE_6.getKey().equals(orderProcessInfo.getDdly()));
if (pushEnterprise) { if (pushEnterprise) {
@ -193,10 +203,10 @@ public class PushInvoiceServiceImpl implements PushInvoiceService {
} else { } else {
log.warn("税号:{},当前数据订单来源为:{},不进行推送数据,直接更新为推送失败,失败原因为:非接口开票数据不进行推送", orderProcessInfo.getXhfNsrsbh(), orderProcessInfo.getDdly()); log.warn("税号:{},当前数据报账单号为:{},不进行推送数据,直接更新为推送失败,失败原因为:无报账单号不进行推送", orderProcessInfo.getXhfNsrsbh(), orderProcessInfo.getBzdh());
OrderInvoiceInfo updateOrderInvoiceInfo = new OrderInvoiceInfo(); OrderInvoiceInfo updateOrderInvoiceInfo = new OrderInvoiceInfo();
updateOrderInvoiceInfo.setFpqqlsh(orderProcessInfo.getFpqqlsh()); updateOrderInvoiceInfo.setFpqqlsh(orderProcessInfo.getFpqqlsh());
updateOrderInvoiceInfo.setInvoicePushSbyy("非接口开票数据不进行推送"); updateOrderInvoiceInfo.setInvoicePushSbyy("无报账单号不进行推送");
int updateByPrimaryKeySelective = orderInvoiceInfoService.updateOrderInvoiceInfoByFpqqlsh(updateOrderInvoiceInfo, shList); int updateByPrimaryKeySelective = orderInvoiceInfoService.updateOrderInvoiceInfoByFpqqlsh(updateOrderInvoiceInfo, shList);
if (updateByPrimaryKeySelective <= 0) { if (updateByPrimaryKeySelective <= 0) {
log.error("{}推送失败原因更新失败", LOGGER_MSG); log.error("{}推送失败原因更新失败", LOGGER_MSG);
@ -348,7 +358,7 @@ public class PushInvoiceServiceImpl implements PushInvoiceService {
//接口类型为发票状态推送 //接口类型为发票状态推送
queryPushInfo.setInterfaceType(fpTsMqData.getPushType()); queryPushInfo.setInterfaceType(fpTsMqData.getPushType());
//byzd1作为系统来源字段使用 //byzd1作为系统来源字段使用
queryPushInfo.setByzd1(xtly); //queryPushInfo.setByzd1(xtly);
List<PushInfo> pushInfoList = pushInfoMapper.selectListByPushInfo(queryPushInfo); List<PushInfo> pushInfoList = pushInfoMapper.selectListByPushInfo(queryPushInfo);
log.info("查询到的推送地址信息:{}", JsonUtils.getInstance().toJsonString(pushInfoList)); log.info("查询到的推送地址信息:{}", JsonUtils.getInstance().toJsonString(pushInfoList));
@ -948,7 +958,13 @@ public class PushInvoiceServiceImpl implements PushInvoiceService {
public String convertToYwxtParam(CommonTsMqData fpTsMqData,String xtly,String content,String poClient){ public String convertToYwxtParam(CommonTsMqData fpTsMqData,String xtly,String content,String poClient){
String ywxtParam = ""; String ywxtParam = "";
if(OrderInfoEnum.INTERFACE_TYPE_INVOICE_PUSH_STATUS_1.getKey().equals(fpTsMqData.getPushType())){ if(OrderInfoEnum.INTERFACE_TYPE_INVOICE_PUSH_STATUS_1.getKey().equals(fpTsMqData.getPushType())){
OrderProcessInfo orderProcessInfo = orderProcessService.queryOrderProcessInfoByFpqqlsh(fpTsMqData.getFpTsMqData().getFpqqlsh(), null);
OrderInvoiceInfo orderInvoiceInfo1 = new OrderInvoiceInfo();
orderInvoiceInfo1.setFpqqlsh(orderProcessInfo.getFpqqlsh());
OrderInvoiceInfo orderInvoiceInfo = orderInvoiceInfoService.selectOrderInvoiceInfo(orderInvoiceInfo1, null);
//发票开具推送 //发票开具推送
if(OrderInfoEnum.SYS_SOURCE_SAP.getKey().equals(xtly)){ if(OrderInfoEnum.SYS_SOURCE_SAP.getKey().equals(xtly)){
DdfpzxxV5 ddfpzxxV5 = JsonUtils.getInstance().parseObject(content.substring(1,content.length()-1), DdfpzxxV5.class); DdfpzxxV5 ddfpzxxV5 = JsonUtils.getInstance().parseObject(content.substring(1,content.length()-1), DdfpzxxV5.class);
@ -979,8 +995,9 @@ public class PushInvoiceServiceImpl implements PushInvoiceService {
fpkjtsReqSap.setZGFDH(ddfpxx.getGMFDH()); fpkjtsReqSap.setZGFDH(ddfpxx.getGMFDH());
fpkjtsReqSap.setZXFDH(ddfpxx.getXHFDH()); fpkjtsReqSap.setZXFDH(ddfpxx.getXHFDH());
fpkjtsReqSap.setZXFZH(ddfpxx.getXHFZH()); fpkjtsReqSap.setZXFZH(ddfpxx.getXHFZH());
fpkjtsReqSap.setZGSDM(""); fpkjtsReqSap.setZGSDM(orderProcessInfo.getGsdm());
fpkjtsReqSap.setZYWDJ(""); fpkjtsReqSap.setZYWDJ(orderProcessInfo.getBzdh());
fpkjtsReqSap.setIMGID(orderInvoiceInfo.getDocuId());
//明细信息 //明细信息
ddmxxx.stream().forEach(f -> { ddmxxx.stream().forEach(f -> {
FpkjtsMxSap detail = new FpkjtsMxSap(); FpkjtsMxSap detail = new FpkjtsMxSap();
@ -988,7 +1005,7 @@ public class PushInvoiceServiceImpl implements PushInvoiceService {
detail.setZFPDM(ddfpxx.getFPDM()); detail.setZFPDM(ddfpxx.getFPDM());
detail.setZFPHM(ddfpxx.getFPHM()); detail.setZFPHM(ddfpxx.getFPHM());
detail.setZFPHH(f.getXH()); detail.setZFPHH(f.getXH());
detail.setMATNR(""); detail.setMATNR(f.getZXBM());
detail.setZGGXH(f.getGGXH()); detail.setZGGXH(f.getGGXH());
detail.setZSLDW(f.getDW()); detail.setZSLDW(f.getDW());
detail.setZZSL(f.getSPSL()); detail.setZZSL(f.getSPSL());
@ -999,7 +1016,7 @@ public class PushInvoiceServiceImpl implements PushInvoiceService {
detail.setINVOICEDATE(ddfpxx.getKPRQ()); detail.setINVOICEDATE(ddfpxx.getKPRQ());
detail.setINVOICETYPE(ddfpxx.getFPLXDM()); detail.setINVOICETYPE(ddfpxx.getFPLXDM());
detail.setZHWMC(f.getXMMC()); detail.setZHWMC(f.getXMMC());
detail.setZSM(""); detail.setZSM(smMap.get(new BigDecimal(f.getSL())).toString());
itemList.add(detail); itemList.add(detail);
}); });
fpkjtsReqSap.setITITEM(itemList); fpkjtsReqSap.setITITEM(itemList);
@ -1018,6 +1035,7 @@ public class PushInvoiceServiceImpl implements PushInvoiceService {
ywxtParam = JsonUtils.getInstance().toJsonString(poCommonRequestParam); ywxtParam = JsonUtils.getInstance().toJsonString(poCommonRequestParam);
} }
}else if(OrderInfoEnum.INTERFACE_TYPE_INVOICE_PUSH_STATUS_2.getKey().equals(fpTsMqData.getPushType())){ }else if(OrderInfoEnum.INTERFACE_TYPE_INVOICE_PUSH_STATUS_2.getKey().equals(fpTsMqData.getPushType())){
OrderInvoiceInfo orderInvoiceInfo = orderInvoiceInfoService.selectOrderInvoiceInfoByFpdmAndFphm(fpTsMqData.getZfTsMqData().getFpdm(), fpTsMqData.getZfTsMqData().getFphm(), null);
//发票作废推送 //发票作废推送
if(OrderInfoEnum.SYS_SOURCE_SAP.getKey().equals(xtly)){ if(OrderInfoEnum.SYS_SOURCE_SAP.getKey().equals(xtly)){
ZffptsV5 zffptsV5 = JsonUtils.getInstance().parseObject(content, ZffptsV5.class); ZffptsV5 zffptsV5 = JsonUtils.getInstance().parseObject(content, ZffptsV5.class);
@ -1025,8 +1043,9 @@ public class PushInvoiceServiceImpl implements PushInvoiceService {
FpzftsReqSap fpzftsReqSap = new FpzftsReqSap(); FpzftsReqSap fpzftsReqSap = new FpzftsReqSap();
fpzftsReqSap.setZFPDM(zffptsV5.getFPDM()); fpzftsReqSap.setZFPDM(zffptsV5.getFPDM());
fpzftsReqSap.setZFPHM(zffptsV5.getFPHM()); fpzftsReqSap.setZFPHM(zffptsV5.getFPHM());
fpzftsReqSap.setZFPZT(""); //0 是正常 1是作废
fpzftsReqSap.setZJSDH(""); fpzftsReqSap.setZFPZT(ConfigureConstant.STRING_1);
fpzftsReqSap.setZJSDH(orderInvoiceInfo.getDdh());
IsInput isInput = new IsInput(); IsInput isInput = new IsInput();
isInput.setSYSID(OrderInfoEnum.SYS_SIGN_FP.getKey()); isInput.setSYSID(OrderInfoEnum.SYS_SIGN_FP.getKey());
isInput.setIFYWID(OrderInfoEnum.INTERFACE_BUSINESS_ID_FPZFTS.getKey()); isInput.setIFYWID(OrderInfoEnum.INTERFACE_BUSINESS_ID_FPZFTS.getKey());

@ -2,6 +2,7 @@ package com.dxhy.order.consumer.openapi.api;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.http.HttpUtil; import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.dxhy.order.baseservice.config.BaseServiceConfig; import com.dxhy.order.baseservice.config.BaseServiceConfig;
import com.dxhy.order.baseservice.module.buyer.protocol.GmfxxcxReqBO; import com.dxhy.order.baseservice.module.buyer.protocol.GmfxxcxReqBO;
@ -22,6 +23,7 @@ import com.dxhy.order.consumer.constant.RespStatusEnum;
import com.dxhy.order.consumer.openapi.protocol.CheckResult; import com.dxhy.order.consumer.openapi.protocol.CheckResult;
import com.dxhy.order.consumer.openapi.protocol.CommonRequestParam; import com.dxhy.order.consumer.openapi.protocol.CommonRequestParam;
import com.dxhy.order.consumer.openapi.protocol.po.EsOutput; 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.PoCommonRequestParam;
import com.dxhy.order.consumer.openapi.protocol.po.PoCommonResponseParam; import com.dxhy.order.consumer.openapi.protocol.po.PoCommonResponseParam;
import com.dxhy.order.consumer.openapi.protocol.v4.fpyl.FpylcxReqBO; import com.dxhy.order.consumer.openapi.protocol.v4.fpyl.FpylcxReqBO;
@ -42,6 +44,7 @@ import com.dxhy.order.consumer.openapi.protocol.v6.sdenergy.MdmGmfxxtbReqBO;
import com.dxhy.order.consumer.openapi.service.*; import com.dxhy.order.consumer.openapi.service.*;
import com.dxhy.order.consumer.utils.BeanTransitionUtils; import com.dxhy.order.consumer.utils.BeanTransitionUtils;
import com.dxhy.order.exception.OrderReceiveException; import com.dxhy.order.exception.OrderReceiveException;
import com.dxhy.order.model.OrderInvoiceInfo;
import com.dxhy.order.utils.HttpUtils; import com.dxhy.order.utils.HttpUtils;
import com.dxhy.order.utils.JsonUtils; import com.dxhy.order.utils.JsonUtils;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -395,11 +398,15 @@ public class InvoiceRestApiV6 {
return returnJsonString = ""; return returnJsonString = "";
}else if(ConfigurerInfo.transferTojx.equals(interfaceName)){ }else if(ConfigurerInfo.transferTojx.equals(interfaceName)){
log.info("开始调用进项接口"); log.info("开始调用进项接口");
//根据发票代码 + 号码更新字段
PoCommonRequestParam requestParam = JsonUtils.getInstance().parseObject(reqStr, PoCommonRequestParam.class);
String result = interfaceServiceV3.syncAccountInfo(requestParam);
Map<String,String> headMap = new HashMap<>(); Map<String,String> headMap = new HashMap<>();
headMap.put("token",ConfigureConstant.POTOKEN); headMap.put("token",ConfigureConstant.POTOKEN);
String s = HttpUtils.doPostWithHeader(jxUrl,reqStr,headMap); String s = HttpUtils.doPostWithHeader(jxUrl,reqStr,headMap);
log.info("进项接口返回:{}",s); log.info("进项接口返回:{}",result);
return s; return result;
} else { } else {
returnJsonString = ""; returnJsonString = "";
} }

@ -11,6 +11,7 @@ import com.dxhy.order.baseservice.openapi.model.SksbxxtbRspBO;
import com.dxhy.order.baseservice.openapi.protocol.spxx.SpxxcxRspBO; import com.dxhy.order.baseservice.openapi.protocol.spxx.SpxxcxRspBO;
import com.dxhy.order.baseservice.openapi.protocol.spxx.SpxxtbReqBO; import com.dxhy.order.baseservice.openapi.protocol.spxx.SpxxtbReqBO;
import com.dxhy.order.baseservice.openapi.protocol.spxx.SpxxtbRspBO; import com.dxhy.order.baseservice.openapi.protocol.spxx.SpxxtbRspBO;
import com.dxhy.order.consumer.openapi.protocol.po.PoCommonRequestParam;
import com.dxhy.order.consumer.openapi.protocol.v4.ResponseV4BO; import com.dxhy.order.consumer.openapi.protocol.v4.ResponseV4BO;
import com.dxhy.order.consumer.openapi.protocol.v4.fpcb.CbztcxReqBO; import com.dxhy.order.consumer.openapi.protocol.v4.fpcb.CbztcxReqBO;
import com.dxhy.order.consumer.openapi.protocol.v4.fpcb.CbztcxRspBO; import com.dxhy.order.consumer.openapi.protocol.v4.fpcb.CbztcxRspBO;
@ -44,6 +45,7 @@ import com.dxhy.order.consumer.openapi.protocol.v4.taxequipment.SksbxxCxReqBO;
import com.dxhy.order.consumer.openapi.protocol.v4.taxequipment.SksbxxCxRspBO; import com.dxhy.order.consumer.openapi.protocol.v4.taxequipment.SksbxxCxRspBO;
import com.dxhy.order.consumer.openapi.protocol.v4.zpjsqr.ZpjsqrReqBO; import com.dxhy.order.consumer.openapi.protocol.v4.zpjsqr.ZpjsqrReqBO;
import com.dxhy.order.consumer.openapi.protocol.v4.zpjsqr.ZpjsqrRspBO; import com.dxhy.order.consumer.openapi.protocol.v4.zpjsqr.ZpjsqrRspBO;
import com.dxhy.order.model.OrderInvoiceInfo;
import java.util.List; import java.util.List;
@ -382,4 +384,6 @@ public interface InterfaceServiceV3 {
* @return * @return
*/ */
List<GroupTaxRespBO> syncGroupTax(List<GroupTaxReqBO> groupTaxReqBO, String secretId); List<GroupTaxRespBO> syncGroupTax(List<GroupTaxReqBO> groupTaxReqBO, String secretId);
String syncAccountInfo(PoCommonRequestParam requestParam);
} }

@ -8,6 +8,8 @@ import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.RandomUtil; import cn.hutool.core.util.RandomUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alibaba.csp.sentinel.annotation.SentinelResource; import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.dxhy.base.constant.TaxSeparateConfig; import com.dxhy.base.constant.TaxSeparateConfig;
import com.dxhy.base.utils.PriceTaxSeparationUtilNew; import com.dxhy.base.utils.PriceTaxSeparationUtilNew;
import com.dxhy.order.baseservice.config.BaseServiceConfig; import com.dxhy.order.baseservice.config.BaseServiceConfig;
@ -46,6 +48,8 @@ import com.dxhy.order.consumer.modules.order.service.*;
import com.dxhy.order.consumer.modules.validate.service.ValidateInterfaceOrderService; import com.dxhy.order.consumer.modules.validate.service.ValidateInterfaceOrderService;
import com.dxhy.order.consumer.modules.validate.service.ValidateSpecialInvoiceService; import com.dxhy.order.consumer.modules.validate.service.ValidateSpecialInvoiceService;
import com.dxhy.order.consumer.openapi.protocol.InterfaceBlockExceptionUtil; import com.dxhy.order.consumer.openapi.protocol.InterfaceBlockExceptionUtil;
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.v4.ResponseV4BO; import com.dxhy.order.consumer.openapi.protocol.v4.ResponseV4BO;
import com.dxhy.order.consumer.openapi.protocol.v4.fpcb.CbztcxReqBO; import com.dxhy.order.consumer.openapi.protocol.v4.fpcb.CbztcxReqBO;
import com.dxhy.order.consumer.openapi.protocol.v4.fpcb.CbztcxRspBO; import com.dxhy.order.consumer.openapi.protocol.v4.fpcb.CbztcxRspBO;
@ -5391,6 +5395,46 @@ public class InterfaceServiceImplV3 implements InterfaceServiceV3 {
return resp; return resp;
} }
@Override
public String syncAccountInfo(PoCommonRequestParam requestParam){
log.info("FI005推送会计凭证信息,{}",JSONObject.toJSONString(requestParam));
IsInput isInput = requestParam.getIS_INPUT();
String data = isInput.getZDATA();
JSONArray jsonArray = JSONObject.parseArray(data);
StringBuffer PROMSG = new StringBuffer();
String PROTYP = "S";
for (Object t : jsonArray) {
JSONObject jsonObject = (JSONObject)t;
OrderInvoiceInfo invoiceInfo = new OrderInvoiceInfo();
invoiceInfo.setFpdm(jsonObject.getString("ZFPDM"));
invoiceInfo.setFphm(jsonObject.getString("ZFPHM"));
invoiceInfo.setVoucherNo(jsonObject.getString("BELNR"));//会计凭证号
invoiceInfo.setAccountDate(jsonObject.getString("BUDAT"));//过账日期
invoiceInfo.setCheckNo(jsonObject.getString("ZBZDH"));//报账单号
if(orderInvoiceInfoService.updateInvoiceInfoByNoAndCode(invoiceInfo, null) <= 0) {
PROTYP = "E";
PROMSG.append(String.format("票据号码:%s-绑定失败!",jsonObject.getString("ZFPHM")));
}else{
PROMSG.append(String.format("票据号码:%s-绑定成功!",jsonObject.getString("ZFPHM")));
}
}
JSONObject ZDATA = new JSONObject();
ZDATA.put("PROMSG",PROMSG.toString());
ZDATA.put("PROTYP",PROTYP);
JSONObject ES_OUTPUT = new JSONObject();
ES_OUTPUT.put("BSKEY",isInput.getBSKEY());//外围系统唯一标识
ES_OUTPUT.put("SAPKEY",isInput.getSAPKEY());//sap数据唯一标识
ES_OUTPUT.put("ZTYPE",PROTYP);//E 是失败,S 是成功
ES_OUTPUT.put("ZMESSAGE","E".equals(PROTYP)? "处理失败":"处理成功");
ES_OUTPUT.put("ZDATA",ZDATA);
JSONObject result = new JSONObject();
result.put("ES_OUTPUT",ES_OUTPUT);
return result.toJSONString();
}
private GroupTaxRespBO syncGroupTax(GroupTaxReqBO groupTaxReqBO, String secretId) throws OrderReceiveException { private GroupTaxRespBO syncGroupTax(GroupTaxReqBO groupTaxReqBO, String secretId) throws OrderReceiveException {
if (StringUtils.isEmpty(groupTaxReqBO.getSpmc())) { if (StringUtils.isEmpty(groupTaxReqBO.getSpmc())) {
throw new OrderReceiveException(OrderInfoContentEnum.SYNC_GROUP_TAX_009999.getKey(), OrderInfoContentEnum.SYNC_GROUP_TAX_009999.getMessage()); throw new OrderReceiveException(OrderInfoContentEnum.SYNC_GROUP_TAX_009999.getKey(), OrderInfoContentEnum.SYNC_GROUP_TAX_009999.getMessage());

@ -37,6 +37,14 @@ public interface OrderInvoiceInfoMapper {
*/ */
int updateOrderInvoiceInfoByFpqqlsh(@Param("orderInvoiceInfo") OrderInvoiceInfo record, @Param("shList") List<String> shList); int updateOrderInvoiceInfoByFpqqlsh(@Param("orderInvoiceInfo") OrderInvoiceInfo record, @Param("shList") List<String> shList);
/**
* 根据发票号码 + 发票代码更新发票数据
*
* @param record
* @param shList
* @return
*/
int updateInvoiceInfoByNoAndCode(@Param("orderInvoiceInfo") OrderInvoiceInfo record, @Param("shList") List<String> shList);
/** /**
* 根据发票代码号码查询数据 * 根据发票代码号码查询数据
* *

@ -9,6 +9,7 @@ import com.dxhy.order.baseservice.module.thirdservice.rabbitmq.model.RabbitMqCom
import com.dxhy.order.invoice.module.invoice.model.FileDownLoad; import com.dxhy.order.invoice.module.invoice.model.FileDownLoad;
import com.dxhy.order.invoice.module.invoice.model.bo.QueryCountInvoiceBO; import com.dxhy.order.invoice.module.invoice.model.bo.QueryCountInvoiceBO;
import com.dxhy.order.invoice.module.invoice.model.vo.*; import com.dxhy.order.invoice.module.invoice.model.vo.*;
import org.apache.ibatis.annotations.Param;
import java.io.File; import java.io.File;
import java.io.OutputStream; import java.io.OutputStream;
@ -118,6 +119,8 @@ public interface OrderInvoiceInfoService {
*/ */
int updateDyztByFpqqlsh(String fpqqlsh, String dyzt, String dyztms, List<String> shList); int updateDyztByFpqqlsh(String fpqqlsh, String dyzt, String dyztms, List<String> shList);
int updateInvoiceInfoByNoAndCode(OrderInvoiceInfo invoiceInfo, List<String> shList);
/** /**
* 根据发票id更新发票信息 * 根据发票id更新发票信息
* *

@ -265,6 +265,11 @@ public class OrderInvoiceInfoServiceImpl implements OrderInvoiceInfoService {
} }
@Override
public int updateInvoiceInfoByNoAndCode(OrderInvoiceInfo invoiceInfo, List<String> shList){
return orderInvoiceInfoMapper.updateInvoiceInfoByNoAndCode(invoiceInfo,shList);
}
/** /**
* 插入发票数据统一入口 * 插入发票数据统一入口
* *

@ -885,6 +885,47 @@
</if> </if>
</where> </where>
</update> </update>
<update id="updateInvoiceInfoByNoAndCode" parameterType="com.dxhy.order.model.OrderInvoiceInfo">
update order_invoice_info
<set>
<if test="orderInvoiceInfo.voucherNo != null">
voucher_no = #{orderInvoiceInfo.voucherNo,jdbcType=VARCHAR},
</if>
<if test="orderInvoiceInfo.accountDate != null">
account_date = #{orderInvoiceInfo.accountDate,jdbcType=VARCHAR},
</if>
<if test="orderInvoiceInfo.checkNo != null">
check_no = #{orderInvoiceInfo.checkNo,jdbcType=VARCHAR},
</if>
</set>
<where>
<if test="orderInvoiceInfo.fpqqlsh != null">
and fpqqlsh = #{orderInvoiceInfo.fpqqlsh,jdbcType=VARCHAR}
</if>
<if test="orderInvoiceInfo.fpdm != null and orderInvoiceInfo.fpdm != ''">
fpdm = #{orderInvoiceInfo.fpdm,jdbcType=VARCHAR},
</if>
<if test="orderInvoiceInfo.fphm != null and orderInvoiceInfo.fphm != ''">
fphm = #{orderInvoiceInfo.fphm,jdbcType=VARCHAR},
</if>
<if test="shList != null and shList.size() == 0">
and xhf_nsrsbh = ''
</if>
<if test="shList != null and shList.size() == 1">
and xhf_nsrsbh =
<foreach collection="shList" index="index" item="item">
#{item}
</foreach>
</if>
<if test="shList != null and shList.size() > 1">
and xhf_nsrsbh in
<foreach collection="shList" index="index" item="item"
open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</update>
<select id="selectOrderInvoiceInfoByFpdmAndFphm" resultMap="BaseResultMap" <select id="selectOrderInvoiceInfoByFpdmAndFphm" resultMap="BaseResultMap"
parameterType="java.lang.String"> parameterType="java.lang.String">

Loading…
Cancel
Save