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

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

@ -556,9 +556,23 @@ public class ConfirmServiceImpl extends ServiceImpl<ConfirmDao, TDxHttpLog> impl
// } else { // } else {
// applyInvoice.setYxse(list.get(i).getDkTaxAmount().toString()); // 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()); applyInvoice.setYxse(list.get(i).getDkTaxAmount().toString());
}else { }else if(list.get(i).getTaxAmount() != null){
applyInvoice.setYxse(list.get(i).getTaxAmount().toString()); applyInvoice.setYxse(list.get(i).getTaxAmount().toString());
} }
if("4".equals(list.get(i).getRzlx()) || "6".equals(list.get(i).getRzlx())) { 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) { } catch (Exception e) {
log.info("申请认证执行失败"); log.error("申请认证执行失败,失败原因是:{}",e);
e.printStackTrace(); e.printStackTrace();
} }
} }

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

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

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

@ -612,24 +612,26 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter {
InvoiceInfo invoiceInfo = convertToInvoiceInfo(invoice); InvoiceInfo invoiceInfo = convertToInvoiceInfo(invoice);
log.info("进行价税分离的发票信息为:{}", invoiceInfo); log.info("进行价税分离的发票信息为:{}", invoiceInfo);
ServiceResult<InvoiceInfo> invoiceResult = new ServiceResult<>();
//0523晚成伟提出新需求,客运汽车票必须实名才可以进行价税分离 //0523晚成伟提出新需求,客运汽车票必须实名才可以进行价税分离
// if(SNFplxEnum.KYQCP.getFplxDm().equals(fplxdm)){ if(SNFplxEnum.KYQCP.getFplxDm().equals(fplxdm)){
// if(StringUtils.isEmpty(invoice.getRiderName()) || StringUtils.isEmpty(invoice.getIdcardNo())){ if(StringUtils.isEmpty(invoice.getRiderName()) || StringUtils.isEmpty(invoice.getIdcardNo())){
// return result; log.info("非实名的实名客票 不需要做价税分离");
// }
// }
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 (data.getTaxAmount() != null) { invoiceResult.setMsg("ok");
invoice.setTotalTax(data.getTaxAmount().toString()); 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.setStatusUpdateDate(new Date());
} }
update.setCompCode(infos.getCompCode()); update.setCompCode(infos.getCompCode());
// 报账单号 报账人
update.setBzdh(infos.getBzdh());
update.setBzr(infos.getBzr());
TDxInvoiceSales tDxInvoiceSales = new TDxInvoiceSales(); TDxInvoiceSales tDxInvoiceSales = new TDxInvoiceSales();
tDxInvoiceSales.setQsDate(new Date()); tDxInvoiceSales.setQsDate(new Date());
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_WRITE); DynamicContextHolder.push(dbName + DbConstant.BUSINESS_WRITE);
@ -1813,6 +1817,10 @@ public class InvoicePoolServiceImpl implements InvoicePoolService {
invoice.setCheckCode(info.getCheckCode()); invoice.setCheckCode(info.getCheckCode());
} }
// 报账单号 报账人
invoice.setBzdh(info.getBzdh());
invoice.setBzr(info.getBzr());
invoice.setSourceSystem("1"); invoice.setSourceSystem("1");
invoice.setValid("1"); invoice.setValid("1");
invoice.setQsDate(new Date()); invoice.setQsDate(new Date());

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

Loading…
Cancel
Save