Merge branch 'test' of D:\work\project\sdny\pt with conflicts.

release
yefei 2 years ago
parent 18c6b11297
commit ca22cbb2e8
  1. 2
      dxhy-base/src/main/resources/mapper/BaseFpZhMapper.xml
  2. 20
      dxhy-core/src/main/java/com/dxhy/core/job/service/impl/ConfirmServiceImpl.java
  3. 48
      dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java
  4. 10
      dxhy-erp/src/main/java/com/dxhy/erp/service/SNPushCheckRecordService.java

@ -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}
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
@ -349,7 +348,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}
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">

@ -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)) {

@ -637,6 +637,16 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter {
log.info("价税分离失败:{}", invoiceResult.getMsg());
return invoiceResult.getMsg();
}
// DynamicContextHolder.push(DbConstant.BASICS_READ);
//
// SysDeptEntity orgByCompCode = sysDeptDao.getOrgByCompCode(compCode);
// log.info("查询的组织信息为:{}",JSONObject.toJSONString(orgByCompCode));
// if(orgByCompCode != null) {
// reimburse.setGfTaxNo(orgByCompCode.getTaxno());
// reimburse.setGfName(orgByCompCode.getTaxname());
// reimburse.setGfAddressAndPhone(orgByCompCode.getAddress() + orgByCompCode.getPhone());
// reimburse.setGfBankAndNo(orgByCompCode.getBank() + orgByCompCode.getAccount());
// }
reimburse = convertToReimburse(invoice, reimburse, fplxdm, company);

Loading…
Cancel
Save