处理机动车与影像对应不起来字段

release
路明慧 2 years ago
parent 65e29ce7dd
commit a7bb958df2
  1. 22
      dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java
  2. 7
      dxhy-erp/src/main/java/com/dxhy/erp/service/SNPushCheckRecordService.java
  3. 73
      dxhy-erp/src/main/java/com/dxhy/erp/service/impl/SignSaveInvoiceInfoServiceImpl.java

@ -1058,7 +1058,19 @@ public class SDNYMainProcessController extends AbstractController {
checkInvoice.put("salesName", checkInvoice.get("xfName")); checkInvoice.put("salesName", checkInvoice.get("xfName"));
checkInvoice.put("salesTaxNo", checkInvoice.get("xfTaxNo")); checkInvoice.put("salesTaxNo", checkInvoice.get("xfTaxNo"));
checkInvoice.put("salesAddressPhone", checkInvoice.get("xfAddressAndPhone")); checkInvoice.put("salesAddressPhone", checkInvoice.get("xfAddressAndPhone"));
checkInvoice.put("salesBank", checkInvoice.get("gfBankAndNo")); checkInvoice.put("salesBank", checkInvoice.get("xfBankAndNo"));
log.info(" sellerPhone={}",checkInvoice.getString("salesBank"));
String xfAddressAndPhone = checkInvoice.getString("xfAddressAndPhone");
log.info("xfAddressAndPhone={}",xfAddressAndPhone);
if (StringUtils.isNotBlank(xfAddressAndPhone)){
String[] split = xfAddressAndPhone.split("\t");
if (split.length == 2) {
checkInvoice.put("sellerPhone", split[1]);
}else {
checkInvoice.put("sellerPhone", xfAddressAndPhone);
}
}
log.info("sellerPhone={}",checkInvoice.getString("sellerPhone"));
checkInvoice.put("checkCode", checkInvoice.get("checkCode")); checkInvoice.put("checkCode", checkInvoice.get("checkCode"));
if("1".equals(checkInvoice.get("invoiceStatus"))){ if("1".equals(checkInvoice.get("invoiceStatus"))){
checkInvoice.put("state", "3"); checkInvoice.put("state", "3");
@ -1071,6 +1083,14 @@ public class SDNYMainProcessController extends AbstractController {
}else if("0".equals(checkInvoice.get("invoiceStatus"))){ }else if("0".equals(checkInvoice.get("invoiceStatus"))){
checkInvoice.put("state", "0"); checkInvoice.put("state", "0");
} }
//机动车添加税率
if (vehicleList != null && vehicleList.get("taxRate") != null) {
String taxRate = vehicleList.getString("taxRate");
BigDecimal tax = new BigDecimal(taxRate);
BigDecimal rate = tax.divide(new BigDecimal(100));
checkInvoice.put("taxRate", rate);
}
log.info("taxRate={}", checkInvoice.get("taxRate"));
checkInvoice.put("tollSign", "07"); checkInvoice.put("tollSign", "07");
//机动车 //机动车

@ -389,13 +389,14 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter {
jsonObject.put("salesName", invoiceData.get("xhfmc")); jsonObject.put("salesName", invoiceData.get("xhfmc"));
jsonObject.put("salesTaxNo", invoiceData.get("xhfsbh")); jsonObject.put("salesTaxNo", invoiceData.get("xhfsbh"));
jsonObject.put("salesAddressPhone", invoiceData.get("xhfdzdh")); jsonObject.put("salesAddressPhone", invoiceData.get("xhfdzdh"));
// if (StringUtils.isBlank(jsonObject.getString("salesAddressPhone")) && invoiceData.get("smfdwgrzz") != null && invoiceData.get("smfdh") != null){ if (StringUtils.isBlank(jsonObject.getString("salesAddressPhone")) && invoiceData.get("smfdwgrzz") != null && invoiceData.get("smfdh") != null){
// jsonObject.put("salesAddressPhone", invoiceData.get("smfdwgrzz").toString() +"\t"+ invoiceData.get("smfdh").toString()); jsonObject.put("salesAddressPhone", invoiceData.get("smfdwgrzz").toString() +"\t"+ invoiceData.get("smfdh").toString());
// } }
if (FplxEnum.JDC.getFplxDm().equals(invoiceType)) { if (FplxEnum.JDC.getFplxDm().equals(invoiceType)) {
if (invoiceData.get("khyh") != null && invoiceData.get("khzh") != null) { if (invoiceData.get("khyh") != null && invoiceData.get("khzh") != null) {
jsonObject.put("salesBank", invoiceData.get("khyh").toString() + invoiceData.get("khzh").toString()); jsonObject.put("salesBank", invoiceData.get("khyh").toString() + invoiceData.get("khzh").toString());
} }
jsonObject.put("sellerPhone",invoiceData.get("smfdh"));
} else { } else {
jsonObject.put("salesBank", invoiceData.get("xhfyhzh")); jsonObject.put("salesBank", invoiceData.get("xhfyhzh"));
} }

@ -94,6 +94,7 @@ public class SignSaveInvoiceInfoServiceImpl extends MpBaseServiceImpl<SignRecord
} }
} }
} }
taxRate = vehicleInvoice.getTaxRate();
} }
// 二手车 // 二手车
if (vehicleInvoice != null) { if (vehicleInvoice != null) {
@ -172,6 +173,8 @@ public class SignSaveInvoiceInfoServiceImpl extends MpBaseServiceImpl<SignRecord
// recordInvoiceUpdate.setDeptId(recordInvoice.getDeptId()); // recordInvoiceUpdate.setDeptId(recordInvoice.getDeptId());
// recordInvoiceUpdate.setDeptName(recordInvoice.getDeptName()); // recordInvoiceUpdate.setDeptName(recordInvoice.getDeptName());
// } // }
recordInvoice.setAuthStatus(recordInvoiceExit.getAuthStatus());
recordInvoice.setRzhYesorno(recordInvoiceExit.getRzhYesorno());
this.updateInvoice(recordInvoice); this.updateInvoice(recordInvoice);
if (recordInvoiceDetail != null && recordInvoiceDetail.size() > 0) { if (recordInvoiceDetail != null && recordInvoiceDetail.size() > 0) {
@ -183,41 +186,41 @@ public class SignSaveInvoiceInfoServiceImpl extends MpBaseServiceImpl<SignRecord
} }
} }
// 机动车票 //机动车票
// if (vehicleSaleInvoice != null) { if (vehicleSaleInvoice != null) {
//
// boolean deleteVehicleSaleInvoice = boolean deleteVehicleSaleInvoice =
// signJdcService.deleteVehicleSaleInvoice(recordInvoice.getUuid(), dbName); signJdcService.deleteVehicleSaleInvoice(recordInvoice.getUuid(), dbName);
// if (deleteVehicleSaleInvoice) { if (deleteVehicleSaleInvoice) {
// signJdcService.saveVehicleSaleInvoice(vehicleSaleInvoice, dbName); signJdcService.saveVehicleSaleInvoice(vehicleSaleInvoice, dbName);
// } }
// // 保存税率统计表 // 保存税率统计表
// if (invoiceStatistics.size() > 0) { if (invoiceStatistics.size() > 0) {
// boolean deleteStatistics = signInvoiceStatisticsService boolean deleteStatistics = signInvoiceStatisticsService
// .deleteStatistics(recordInvoice.getInvoiceCode(), recordInvoice.getInvoiceNo(), dbName); .deleteStatistics(recordInvoice.getInvoiceCode(), recordInvoice.getInvoiceNo(), dbName);
// if (deleteStatistics) { if (deleteStatistics) {
// signInvoiceStatisticsService.saveInvoiceStatistics(invoiceStatistics, dbName); signInvoiceStatisticsService.saveInvoiceStatistics(invoiceStatistics, dbName);
// } }
// } }
//
// } }
// // 二手车 // 二手车
// if (vehicleInvoice != null) { if (vehicleInvoice != null) {
//
// boolean deleteVehicleSaleInvoice = boolean deleteVehicleSaleInvoice =
// signJdcService.deleteVehicleSaleInvoice(recordInvoice.getUuid(), dbName); signJdcService.deleteVehicleSaleInvoice(recordInvoice.getUuid(), dbName);
// if (deleteVehicleSaleInvoice) { if (deleteVehicleSaleInvoice) {
// signJdcService.saveVehicleSaleInvoice(vehicleInvoice, dbName); signJdcService.saveVehicleSaleInvoice(vehicleInvoice, dbName);
// } }
//
// // 保存税率统计表 // 保存税率统计表
// if (invoiceStatistics.size() > 0) { if (invoiceStatistics.size() > 0) {
// signInvoiceStatisticsService.remove(new UpdateWrapper<TdxRecordInvoiceStatistics>() signInvoiceStatisticsService.remove(new UpdateWrapper<TdxRecordInvoiceStatistics>()
// .eq("invoice_code", recordInvoice.getInvoiceCode()).eq("invoice_no", recordInvoice.getInvoiceNo())); .eq("invoice_code", recordInvoice.getInvoiceCode()).eq("invoice_no", recordInvoice.getInvoiceNo()));
// signInvoiceStatisticsService.saveBatch(invoiceStatistics); signInvoiceStatisticsService.saveBatch(invoiceStatistics);
// } }
//
// } }
} }
} }

Loading…
Cancel
Save