Merge branches '0507' and 'test' of http://192.168.12.182/invoice/pt into test

release
yishiqihuasheng 2 years ago
commit 775a436bbb
  1. 2
      dxhy-admin/src/main/java/com/dxhy/admin/sys/service/impl/SysUserServiceImpl.java
  2. 2
      dxhy-base/src/main/resources/mapper/BaseFpZhMapper.xml
  3. 20
      dxhy-core/src/main/java/com/dxhy/core/job/service/impl/ConfirmServiceImpl.java
  4. 48
      dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java
  5. 10
      dxhy-erp/src/main/java/com/dxhy/erp/entity/SalesInvoicePushInfos.java
  6. 10
      dxhy-erp/src/main/java/com/dxhy/erp/entity/TdxSaleRecordInvoice.java
  7. 34
      dxhy-erp/src/main/java/com/dxhy/erp/service/SNPushCheckRecordService.java
  8. 8
      dxhy-erp/src/main/java/com/dxhy/erp/service/impl/InvoicePoolServiceImpl.java
  9. 2
      dxhy-erp/src/main/java/com/dxhy/erp/service/impl/SignSaveInvoiceInfoServiceImpl.java

@ -454,6 +454,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> i
}
private void toDeptOrgCode(User user, List<TaxOrgCode> orgCodeList, List<SysDeptEntity> queryDept) {
log.info("查询到的企业列表为:{}",queryDept);
String qsStatus = "0";
String productType = "0";
if (queryDept.size() > 0) {
@ -469,6 +470,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> i
orgCodeList.addAll(oldTaxOrgCode);
qsStatus = queryDept.get(0).getQsStatus();
productType = queryDept.get(0).getProductType();
log.info("orgCodeList:{}",orgCodeList);
user.setOrgCodes(orgCodeList);
user.setQsStatus(qsStatus);
user.setProductType(productType);

@ -78,7 +78,6 @@
and t.bdk_status in ('1','2')
and t.export_mark = '0'
and t.auth_status != '0'
and t.rzh_yesorno != '0'
and t.company = #{company}
<if test="sign != '88'">
and t.gf_tax_no in
@ -359,7 +358,6 @@
and t.auth_status != '0'
and t.bdk_status in ('1','2')
and t.export_mark = '0'
and t.rzh_yesorno != '0'
and t.company =#{company}
<if test="sign != '88'">
and t.gf_tax_no in

@ -556,9 +556,23 @@ public class ConfirmServiceImpl extends ServiceImpl<ConfirmDao, TDxHttpLog> impl
// } else {
// applyInvoice.setYxse(list.get(i).getDkTaxAmount().toString());
// }
if("31".equals(list.get(i).getInvoiceType())){
if("31".equals(list.get(i).getInvoiceType()) ||"32".equals(list.get(i).getInvoiceType())
|| "185".equals(list.get(i).getInvoiceType())){
if(StringUtils.isNotEmpty(list.get(i).getInvoiceNo()) && list.get(i).getInvoiceNo().length() == 20){
String invoiceCode = list.get(i).getInvoiceNo().substring(0,12);
String invoiceNum = list.get(i).getInvoiceNo().substring(12);
log.info("全电发票申请认证 invoiceCode={},invoiceNum={}",invoiceCode,invoiceNum);
applyInvoice.setInvoiceCode(invoiceCode);
applyInvoice.setInvoiceNo(invoiceNum);
}
}
log.info("list.get(i).getDkTaxAmount() = {}",list.get(i).getDkTaxAmount());
log.info("list.get(i).getTaxAmount() = {}",list.get(i).getTaxAmount());
if("31".equals(list.get(i).getInvoiceType()) && list.get(i).getDkTaxAmount() != null){
applyInvoice.setYxse(list.get(i).getDkTaxAmount().toString());
}else {
}else if(list.get(i).getTaxAmount() != null){
applyInvoice.setYxse(list.get(i).getTaxAmount().toString());
}
if("4".equals(list.get(i).getRzlx()) || "6".equals(list.get(i).getRzlx())) {
@ -630,7 +644,7 @@ public class ConfirmServiceImpl extends ServiceImpl<ConfirmDao, TDxHttpLog> impl
}
}
} catch (Exception e) {
log.info("申请认证执行失败");
log.error("申请认证执行失败,失败原因是:{}",e);
e.printStackTrace();
}
}

@ -487,39 +487,41 @@ public class SDNYMainProcessController extends AbstractController {
snDetailMap.put("amount", detail.getString("detailAmount"));
}
if ("免税".equals(detail.getString("taxRate"))) {
if ("免税".equals(detail.getString("taxRate")) || "不征税".equals(detail.getString("taxRate")) || "***".equals(detail.getString("taxRate"))) {
taxRateDetail = "0";
snDetailMap.put("taxRate", taxRateDetail);
} else {
if (detail.get("taxRate") != null && StringUtils.isNoneBlank(detail.get("taxRate").toString())) {
taxRateDetail = detail.get("taxRate").toString();
if (!"0".equals(taxRateDetail)) {
if (StringUtils.isNoneBlank(taxRateDetail)) {
int index = taxRateDetail.indexOf("%");
if (index > 0) {
taxRateDetail = taxRateDetail.substring(0, taxRateDetail.length() - 1);
Float num = Float.parseFloat(taxRateDetail);
if (num > 9) {
taxRateDetail = "0." + taxRateDetail;
} else {
if (!taxRateDetail.startsWith("0")) {
taxRateDetail = "0.0" + taxRateDetail;
try {
taxRateDetail = detail.get("taxRate").toString();
if (!"0".equals(taxRateDetail)) {
if (StringUtils.isNoneBlank(taxRateDetail)) {
int index = taxRateDetail.indexOf("%");
if (index > 0) {
taxRateDetail = taxRateDetail.substring(0, taxRateDetail.length() - 1);
Float num = Float.parseFloat(taxRateDetail);
if (num > 9) {
taxRateDetail = "0." + taxRateDetail;
} else {
if (!taxRateDetail.startsWith("0")) {
taxRateDetail = "0.0" + taxRateDetail;
}
}
}
}else{
Float num = Float.parseFloat(taxRateDetail);
if (num > 9) {
taxRateDetail = "0." + taxRateDetail;
} else {
if (!taxRateDetail.startsWith("0")) {
taxRateDetail = "0.0" + taxRateDetail;
Float num = Float.parseFloat(taxRateDetail);
if (num > 9) {
taxRateDetail = "0." + taxRateDetail;
} else {
if (!taxRateDetail.startsWith("0")) {
taxRateDetail = "0.0" + taxRateDetail;
}
}
}
}
}
// taxRateDetail = CheckUtil.formatPercentSl(taxRateDetail);
}catch (Exception e){
log.error("报错的原因为:{}",e);
taxRateDetail = "0.00";
}
if ("11".equals(invoiceType)) {

@ -88,5 +88,15 @@ public class SalesInvoicePushInfos {
private String buyerPhone;
private String compCode;
/**
* 报账单号
*/
private String bzdh;
/**
* 报账人
*/
private String bzr;
private List<InvoiceDetailInfo> detailList;
}

@ -484,4 +484,14 @@ public class TdxSaleRecordInvoice implements Serializable {
private String incentiveFlag;
private String compCode;
/**
* 报账单号
*/
private String bzdh;
/**
* 报账人
*/
private String bzr;
}

@ -612,24 +612,26 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter {
InvoiceInfo invoiceInfo = convertToInvoiceInfo(invoice);
log.info("进行价税分离的发票信息为:{}", invoiceInfo);
ServiceResult<InvoiceInfo> invoiceResult = new ServiceResult<>();
//0523晚成伟提出新需求,客运汽车票必须实名才可以进行价税分离
// if(SNFplxEnum.KYQCP.getFplxDm().equals(fplxdm)){
// if(StringUtils.isEmpty(invoice.getRiderName()) || StringUtils.isEmpty(invoice.getIdcardNo())){
// return result;
// }
// }
ServiceResult<InvoiceInfo> invoiceResult = this.valoremTaxCount(invoiceInfo, "Y");
InvoiceInfo data = invoiceResult.getData();
if (data != null) {
invoice.setIsDeductible(data.getIsDeductible());
invoice.setTaxRate(data.getTaxRate());
if (data.getInvoiceAmount() != null) {
invoice.setTotalAmount(data.getInvoiceAmount().toString());
if(SNFplxEnum.KYQCP.getFplxDm().equals(fplxdm)){
if(StringUtils.isEmpty(invoice.getRiderName()) || StringUtils.isEmpty(invoice.getIdcardNo())){
log.info("非实名的实名客票 不需要做价税分离");
}
if (data.getTaxAmount() != null) {
invoice.setTotalTax(data.getTaxAmount().toString());
invoiceResult.setMsg("ok");
invoiceResult.setResult(true);
}else {
invoiceResult = this.valoremTaxCount(invoiceInfo, "Y");
InvoiceInfo data = invoiceResult.getData();
if (data != null) {
invoice.setIsDeductible(data.getIsDeductible());
invoice.setTaxRate(data.getTaxRate());
if (data.getInvoiceAmount() != null) {
invoice.setTotalAmount(data.getInvoiceAmount().toString());
}
if (data.getTaxAmount() != null) {
invoice.setTotalTax(data.getTaxAmount().toString());
}
}
}

@ -1662,6 +1662,10 @@ public class InvoicePoolServiceImpl implements InvoicePoolService {
update.setStatusUpdateDate(new Date());
}
update.setCompCode(infos.getCompCode());
// 报账单号 报账人
update.setBzdh(infos.getBzdh());
update.setBzr(infos.getBzr());
TDxInvoiceSales tDxInvoiceSales = new TDxInvoiceSales();
tDxInvoiceSales.setQsDate(new Date());
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_WRITE);
@ -1813,6 +1817,10 @@ public class InvoicePoolServiceImpl implements InvoicePoolService {
invoice.setCheckCode(info.getCheckCode());
}
// 报账单号 报账人
invoice.setBzdh(info.getBzdh());
invoice.setBzr(info.getBzr());
invoice.setSourceSystem("1");
invoice.setValid("1");
invoice.setQsDate(new Date());

@ -529,7 +529,7 @@ public class SignSaveInvoiceInfoServiceImpl extends MpBaseServiceImpl<SignRecord
invoice.setCheckCode(queryInvoiceResult.getString("checkCode"));
invoice.setTxfbz(queryInvoiceResult.getString("tollSign"));
invoice.setSourceSystem("1");
invoice.setCompany(queryInvoiceResult.getString("company"));
invoice.setCompany("SDNYJTJX");
if (FplxEnum.JDC.getFplxDm().equals(invoiceType)) {
invoice.setDetailYesorno("0");
} else {

Loading…
Cancel
Save