|
|
|
@ -19,6 +19,7 @@ import com.dxhy.erp.model.auth.InterfaceCode; |
|
|
|
|
import com.dxhy.erp.service.InvoiceAuthService; |
|
|
|
|
import com.dxhy.erp.service.TDxInvoiceReimburseService; |
|
|
|
|
import com.dxhy.erp.utils.CheckUtils; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
import org.apache.commons.lang.StringUtils; |
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
@ -34,6 +35,7 @@ import java.util.*; |
|
|
|
|
*/ |
|
|
|
|
@SuppressWarnings({"AlibabaMethodTooLong", "AlibabaUndefineMagicConstant"}) |
|
|
|
|
@Service |
|
|
|
|
@Slf4j |
|
|
|
|
public class InvoiceAuthServiceImpl extends MpBaseServiceImpl<RecordInvoiceDao, RecordInvoice> |
|
|
|
|
implements InvoiceAuthService { |
|
|
|
|
|
|
|
|
@ -362,8 +364,11 @@ public class InvoiceAuthServiceImpl extends MpBaseServiceImpl<RecordInvoiceDao, |
|
|
|
|
//成功或者失败标识
|
|
|
|
|
boolean flag = false; |
|
|
|
|
String uuid = zdata1.getZFPDM()+zdata1.getZFPHM(); |
|
|
|
|
//销项标识
|
|
|
|
|
String xxbs = zdata1.getXXBS(); |
|
|
|
|
log.info("xxbs==>{}",xxbs); |
|
|
|
|
DynamicContextHolder.push("business"+DbConstant.BUSINESS_READ); |
|
|
|
|
if(fplxList.contains(zdata1.getZFPLX())){ |
|
|
|
|
if(fplxList.contains(zdata1.getZFPLX()) && !"X".equals(xxbs)){ |
|
|
|
|
TdxRecordInvoice recordInvoiceByUuid = tDxrecordInvoiceDao.getRecordInvoiceByUuid(uuid); |
|
|
|
|
if(recordInvoiceByUuid!=null){ |
|
|
|
|
UpdateWrapper updateWrapper = new UpdateWrapper(); |
|
|
|
@ -419,6 +424,7 @@ public class InvoiceAuthServiceImpl extends MpBaseServiceImpl<RecordInvoiceDao, |
|
|
|
|
DynamicContextHolder.push("business"+DbConstant.BUSINESS_WRITE); |
|
|
|
|
tDxInvoiceReimburseService.getBaseMapper().update(null,updateWrapper); |
|
|
|
|
} |
|
|
|
|
if ("X".equals(xxbs)){ |
|
|
|
|
DynamicContextHolder.push("business"+DbConstant.BUSINESS_WRITE); |
|
|
|
|
UpdateWrapper updateWrapper = new UpdateWrapper(); |
|
|
|
|
updateWrapper.set("sn_voucher_number",zdata1.getBELNR()); |
|
|
|
@ -430,6 +436,8 @@ public class InvoiceAuthServiceImpl extends MpBaseServiceImpl<RecordInvoiceDao, |
|
|
|
|
updateWrapper.set("bzr",zdata1.getZJBRT()); |
|
|
|
|
updateWrapper.eq("uuid",uuid); |
|
|
|
|
tdxSaleRecordInvoiceDao.update(null,updateWrapper); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(!flag){ |
|
|
|
|
promsg.append("票据号码:"+zdata1.getZFPHM()+"绑定成功! "); |
|
|
|
|
} |
|
|
|
|