ariesy 联调查验接口完成 v2

release
yefei 2 years ago
parent 76441daa1e
commit a1d778b7d9
  1. 2
      dxhy-erp/src/main/java/com/dxhy/erp/controller/InterfaceController.java
  2. 44
      dxhy-erp/src/main/java/com/dxhy/erp/service/SNPushCheckRecordService.java

@ -1147,8 +1147,6 @@ public class InterfaceController extends AbstractController {
//进项税转出 //进项税转出
}else if("FI849".equals(requestParam.getIS_INPUT().getIFYWID())){ }else if("FI849".equals(requestParam.getIS_INPUT().getIFYWID())){
resultString = transferOut(requestParam); resultString = transferOut(requestParam);
}else if("FI845".equals(requestParam.getIS_INPUT().getIFYWID())){
resultString = transferOut(requestParam);
} }
return resultString; return resultString;
} }

@ -338,7 +338,7 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter {
* @return * @return
* @throws ParseException * @throws ParseException
*/ */
public ServiceResult<InvoiceInfo> valoremTaxCount(InvoiceInfo invoiceInfo, String enterpriseId, String isDeductible) public ServiceResult<InvoiceInfo> valoremTaxCount(InvoiceInfo invoiceInfo, String isDeductible)
throws ParseException { throws ParseException {
if (isDeductible == null || StringUtils.isEmpty(isDeductible)) { if (isDeductible == null || StringUtils.isEmpty(isDeductible)) {
logger.error("客票价税计算失败:费用类别或可抵扣标识为空"); logger.error("客票价税计算失败:费用类别或可抵扣标识为空");
@ -356,7 +356,7 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter {
} }
// 校验客票可抵扣条件 // 校验客票可抵扣条件
ServiceResult<?> result = checkIsDeduction(invoiceInfo, enterpriseId); ServiceResult<?> result = checkIsDeduction(invoiceInfo);
if (!result.getResult()) { if (!result.getResult()) {
logger.error("客票价税计算失败:" + result.getMsg()); logger.error("客票价税计算失败:" + result.getMsg());
return fail(result.getMsg()); return fail(result.getMsg());
@ -449,7 +449,7 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter {
* @return * @return
* @throws ParseException * @throws ParseException
*/ */
private ServiceResult<?> checkIsDeduction(InvoiceInfo invoiceInfo, String enterpriseId) throws ParseException { private ServiceResult<?> checkIsDeduction(InvoiceInfo invoiceInfo) throws ParseException {
try { try {
String result = verifyInfo(invoiceInfo); String result = verifyInfo(invoiceInfo);
if (!CommonEnum.RESPONSE_INTERFACE_STATUS_CODE_SUCCESS.equals(result)) { if (!CommonEnum.RESPONSE_INTERFACE_STATUS_CODE_SUCCESS.equals(result)) {
@ -487,25 +487,25 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter {
} }
} }
// 校验公路、水路、其他运输客票(实名),航空客运电子客票行程单,火车票 // // 校验公路、水路、其他运输客票(实名),航空客运电子客票行程单,火车票
if (invoiceInfo.getInvoiceTypeCode().equals(Constant.ROAD_TRANSPORT_TICKET_REAL_NAME_CODE) // if (invoiceInfo.getInvoiceTypeCode().equals(Constant.ROAD_TRANSPORT_TICKET_REAL_NAME_CODE)
|| invoiceInfo.getInvoiceTypeCode().equals(Constant.WATER_TRANSPORT_TICKET_REAL_NAME_CODE) // || invoiceInfo.getInvoiceTypeCode().equals(Constant.WATER_TRANSPORT_TICKET_REAL_NAME_CODE)
|| invoiceInfo.getInvoiceTypeCode().equals(Constant.OTHER_TRANSPORT_TICKET_REAL_NAME_CODE) // || invoiceInfo.getInvoiceTypeCode().equals(Constant.OTHER_TRANSPORT_TICKET_REAL_NAME_CODE)
|| invoiceInfo.getInvoiceTypeCode().equals(Constant.AIR_PASSENGER_ELECTRONIC_TICKET_ITINERARY_CODE) // || invoiceInfo.getInvoiceTypeCode().equals(Constant.AIR_PASSENGER_ELECTRONIC_TICKET_ITINERARY_CODE)
|| invoiceInfo.getInvoiceTypeCode().equals(Constant.RAILWAY_TICKET_CODE)) { // || invoiceInfo.getInvoiceTypeCode().equals(Constant.RAILWAY_TICKET_CODE)) {
if (StringUtils.isEmpty(invoiceInfo.getIdentityNumber()) // if (StringUtils.isEmpty(invoiceInfo.getIdentityNumber())
|| StringUtils.isEmpty(invoiceInfo.getPassenger()) || StringUtils.isEmpty(enterpriseId)) { // || StringUtils.isEmpty(invoiceInfo.getPassenger())) {
return fail("必填字段为空"); // return fail("必填字段为空");
} // }
int count = orgUserInfoDao.countUserByIdentityNumber(invoiceInfo.getIdentityNumber(), // int count = orgUserInfoDao.countUserByIdentityNumber(invoiceInfo.getIdentityNumber(),
invoiceInfo.getPassenger(), enterpriseId); // invoiceInfo.getPassenger(), enterpriseId);
if (count == 0) { // if (count == 0) {
return fail("未查询到用户信息"); // return fail("未查询到用户信息");
} // }
if (count > 1) { // if (count > 1) {
return fail("查询到多个用户"); // return fail("查询到多个用户");
} // }
} // }
return ok(); return ok();
} catch (Exception e) { } catch (Exception e) {
logger.error("校验客运发票是否可抵扣异常:" + e.toString()); logger.error("校验客运发票是否可抵扣异常:" + e.toString());

Loading…
Cancel
Save