|
|
|
@ -10,6 +10,7 @@ import com.dxhy.common.datasource.config.DynamicContextHolder; |
|
|
|
|
import com.dxhy.common.enums.FplxEnum; |
|
|
|
|
import com.dxhy.common.enums.ReturnCodeEnum; |
|
|
|
|
import com.dxhy.common.service.impl.MpBaseServiceImpl; |
|
|
|
|
import com.dxhy.common.util.StringHelper; |
|
|
|
|
import com.dxhy.common.util.pojo.Authorize; |
|
|
|
|
import com.dxhy.common.util.pojo.GlobalInfo; |
|
|
|
|
import com.dxhy.erp.dao.*; |
|
|
|
@ -19,6 +20,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 +36,7 @@ import java.util.*; |
|
|
|
|
*/ |
|
|
|
|
@SuppressWarnings({"AlibabaMethodTooLong", "AlibabaUndefineMagicConstant"}) |
|
|
|
|
@Service |
|
|
|
|
@Slf4j |
|
|
|
|
public class InvoiceAuthServiceImpl extends MpBaseServiceImpl<RecordInvoiceDao, RecordInvoice> |
|
|
|
|
implements InvoiceAuthService { |
|
|
|
|
|
|
|
|
@ -339,7 +342,15 @@ public class InvoiceAuthServiceImpl extends MpBaseServiceImpl<RecordInvoiceDao, |
|
|
|
|
fplxList.add("31"); |
|
|
|
|
fplxList.add("32"); |
|
|
|
|
for(ZDATA zdata1:zdata){ |
|
|
|
|
String uuid = zdata1.getZFPDM()+zdata1.getZFPHM(); |
|
|
|
|
log.info("zdata1.getZFPHM()===>{}",zdata1.getZFPHM().length()); |
|
|
|
|
|
|
|
|
|
String fphm = zdata1.getZFPHM(); |
|
|
|
|
if (StringHelper.isNotBlank(fphm) && fphm.length() > 8 && !("26".equals(zdata1.getZFPLX()) || "27".equals(zdata1.getZFPLX()))){ |
|
|
|
|
fphm = fphm.substring(fphm.length() - 8); |
|
|
|
|
log.info("非全电但是号码"); |
|
|
|
|
} |
|
|
|
|
log.info("发票号码{}",fphm); |
|
|
|
|
String uuid = zdata1.getZFPDM()+fphm; |
|
|
|
|
zdata1.setZFPLX(convertFpzldm(zdata1.getZFPLX())); |
|
|
|
|
TdxRecordInvoice recordInvoiceByUuid = tDxrecordInvoiceDao.getRecordInvoiceByUuid(uuid); |
|
|
|
|
//查询票池
|
|
|
|
@ -361,7 +372,14 @@ public class InvoiceAuthServiceImpl extends MpBaseServiceImpl<RecordInvoiceDao, |
|
|
|
|
for(ZDATA zdata1:zdata){ |
|
|
|
|
//成功或者失败标识
|
|
|
|
|
boolean flag = false; |
|
|
|
|
String uuid = zdata1.getZFPDM()+zdata1.getZFPHM(); |
|
|
|
|
log.info("zdata1.getZFPHM(){}",zdata1.getZFPHM().length()); |
|
|
|
|
String fphm = zdata1.getZFPHM(); |
|
|
|
|
if (StringHelper.isNotBlank(fphm) && fphm.length() > 8 && !("26".equals(zdata1.getZFPLX()) || "27".equals(zdata1.getZFPLX()))){ |
|
|
|
|
fphm = fphm.substring(fphm.length() - 8); |
|
|
|
|
log.info("非全电但是号码"); |
|
|
|
|
} |
|
|
|
|
log.info("发票号码{}",fphm); |
|
|
|
|
String uuid = zdata1.getZFPDM()+fphm; |
|
|
|
|
DynamicContextHolder.push("business"+DbConstant.BUSINESS_READ); |
|
|
|
|
if(fplxList.contains(zdata1.getZFPLX())){ |
|
|
|
|
TdxRecordInvoice recordInvoiceByUuid = tDxrecordInvoiceDao.getRecordInvoiceByUuid(uuid); |
|
|
|
|