ariesy 解决进项bug v1

release
yefei 2 years ago
parent fdfbc6d9ba
commit 17fe9514e8
  1. 5
      dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java
  2. 1
      dxhy-base/src/main/java/com/dxhy/base/controller/BaseRzTDxRecordInvoiceController.java
  3. 6
      dxhy-base/src/main/java/com/dxhy/base/service/receipt/BaseReceiptOutServiceImpl.java
  4. 28
      dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml
  5. 2
      dxhy-core/src/main/java/com/dxhy/core/controller/ExcelController.java
  6. 18
      dxhy-core/src/main/java/com/dxhy/core/service/invoicedetail/InvoiceDetailServiceImpl.java
  7. 2
      dxhy-core/src/main/java/com/dxhy/core/util/InvoiceQueryUtil.java
  8. 10
      dxhy-erp/src/main/java/com/dxhy/erp/controller/InterfaceController.java
  9. 6
      dxhy-sign/src/main/java/com/dxhy/sign/service/fpqs/impl/FpqsServiceImpl.java
  10. 9
      dxhy-sign/src/main/java/com/dxhy/sign/service/fpqs/impl/SignFpqsServiceImpl.java

@ -423,6 +423,10 @@ public class BaseInvoiceController extends AbstractController {
pramsMap.put("paymentDateEnd", map.get("paymentDateEnd")); pramsMap.put("paymentDateEnd", map.get("paymentDateEnd"));
pramsMap.put("settlementNo", map.get("settlementNo")); pramsMap.put("settlementNo", map.get("settlementNo"));
pramsMap.put("voucherNumber", map.get("voucherNumber")); pramsMap.put("voucherNumber", map.get("voucherNumber"));
pramsMap.put("snVoucherNumber", map.get("snVoucherNumber"));
pramsMap.put("postingTime", map.get("postingTime"));
pramsMap.put("imageId", map.get("imageId"));
pramsMap.put("accountPeriod", map.get("accountPeriod"));
String inAccountStatus = (String)map.get("inAccountStatus"); String inAccountStatus = (String)map.get("inAccountStatus");
if (sfkrz != null) { if (sfkrz != null) {
@ -628,6 +632,7 @@ public class BaseInvoiceController extends AbstractController {
return ResponseEntity.ok(R.error("签收状态不能为空!")); return ResponseEntity.ok(R.error("签收状态不能为空!"));
} }
String qsflag = getUserInfo().getQsStatus(); String qsflag = getUserInfo().getQsStatus();
log.info("签收开关qsflag:{}",qsflag);
if ("1".equals(qsflag)) { if ("1".equals(qsflag)) {
pramsMap.put("qszt", "1"); pramsMap.put("qszt", "1");
} }

@ -467,6 +467,7 @@ public class BaseRzTDxRecordInvoiceController extends AbstractController {
pramsMap.put("gfsh", gfshList); pramsMap.put("gfsh", gfshList);
String qsflag = getUserInfo().getQsStatus(); String qsflag = getUserInfo().getQsStatus();
pramsMap.put("qsflag", qsflag); pramsMap.put("qsflag", qsflag);
log.info("签收认证状态为:{}",qsflag);
if (!StringHelper.isBlank(datalist)) { if (!StringHelper.isBlank(datalist)) {
pramsMap.put("datalist", datalist); pramsMap.put("datalist", datalist);

@ -199,7 +199,8 @@ public class BaseReceiptOutServiceImpl extends MpBaseServiceImpl<BaseReceiptOutD
QueryWrapper<BaseTDxOutReason> query = new QueryWrapper<>(); QueryWrapper<BaseTDxOutReason> query = new QueryWrapper<>();
query.eq("reason_code", record.getOutReason()); query.eq("reason_code", record.getOutReason());
BaseTDxOutReason reason = baseTDxOutReasonDao.selectOne(query); BaseTDxOutReason reason = baseTDxOutReasonDao.selectOne(query);
vo.setReason(reason.getOutReason()); if (reason != null)
vo.setReason(reason.getOutReason());
return vo; return vo;
} }
@ -651,7 +652,8 @@ public class BaseReceiptOutServiceImpl extends MpBaseServiceImpl<BaseReceiptOutD
QueryWrapper<BaseTDxOutReason> query = new QueryWrapper<>(); QueryWrapper<BaseTDxOutReason> query = new QueryWrapper<>();
query.eq("reason_code", record.getOutReason()); query.eq("reason_code", record.getOutReason());
BaseTDxOutReason reason = baseTDxOutReasonDao.selectOne(query); BaseTDxOutReason reason = baseTDxOutReasonDao.selectOne(query);
vo.setReason(reason.getOutReason()); if (reason != null)
vo.setReason(reason.getOutReason());
// 认证日期 string类型的长日期转为string类型的短日期 // 认证日期 string类型的长日期转为string类型的短日期
String certDate = record.getCertDate(); String certDate = record.getCertDate();
Date date = new Date(); Date date = new Date();

@ -64,7 +64,7 @@
from t_dx_record_invoice t left join t_dx_tax_current c on t.gf_tax_no = c.taxno from t_dx_record_invoice t left join t_dx_tax_current c on t.gf_tax_no = c.taxno
left join t_dx_dk_count d on c.taxno = d.taxno and c.current_tax_period = d.skssq left join t_dx_dk_count d on c.taxno = d.taxno and c.current_tax_period = d.skssq
WHERE date_format(t.invoice_date,'%Y-%m-%d') between #{kpksrq} and #{kpjsrq} WHERE date_format(t.invoice_date,'%Y-%m-%d') between #{kpksrq} and #{kpjsrq}
and (t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08')) and t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08')
and t.rzh_yesorno = '0' and t.rzh_yesorno = '0'
and t.auth_status in('0','5','6') and t.auth_status in('0','5','6')
and t.export_mark = '0' and t.export_mark = '0'
@ -171,6 +171,18 @@
<if test="qsksrq==null or qsksrq=='' or qsjsrq==null or qsjsrq==''"> <if test="qsksrq==null or qsksrq=='' or qsjsrq==null or qsjsrq==''">
order by t.invoice_date desc order by t.invoice_date desc
</if> </if>
<if test="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and t.sn_voucher_number = #{snVoucherNumber}
</if>
<if test="postingTime != null and postingTime != '' and postingTime != 'null' and postingTime != '99'">
and t.postingTime = #{postingTime}
</if>
<if test="imageId != null and imageId != '' and imageId != 'null' and imageId != '99'">
and t.image_id = #{imageId}
</if>
<if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</if>
</select> </select>
<select id="selectDksh" parameterType="java.util.Map" <select id="selectDksh" parameterType="java.util.Map"
resultType="com.dxhy.base.entity.BaseTDxDkCount" resultType="com.dxhy.base.entity.BaseTDxDkCount"
@ -199,7 +211,7 @@
from t_dx_record_invoice t left join t_dx_tax_current c on t.gf_tax_no = c.taxno from t_dx_record_invoice t left join t_dx_tax_current c on t.gf_tax_no = c.taxno
left join t_dx_dk_count d on c.taxno = d.taxno and c.current_tax_period = d.skssq left join t_dx_dk_count d on c.taxno = d.taxno and c.current_tax_period = d.skssq
WHERE to_char(t.invoice_date,'yyyy-MM-dd') between #{kpksrq} and #{kpjsrq} WHERE to_char(t.invoice_date,'yyyy-MM-dd') between #{kpksrq} and #{kpjsrq}
and (t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08')) and t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08')
and t.rzh_yesorno = '0' and t.rzh_yesorno = '0'
and t.auth_status in('0','5','6') and t.auth_status in('0','5','6')
and t.export_mark = '0' and t.export_mark = '0'
@ -323,6 +335,18 @@
<if test="eleInvoiceNo!=null and eleInvoiceNo!='' and eleInvoiceNo!='null'"> <if test="eleInvoiceNo!=null and eleInvoiceNo!='' and eleInvoiceNo!='null'">
and t.ele_invoice_no = #{eleInvoiceNo} and t.ele_invoice_no = #{eleInvoiceNo}
</if> </if>
<if test="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and t.sn_voucher_number = #{snVoucherNumber}
</if>
<if test="postingTime != null and postingTime != '' and postingTime != 'null' and postingTime != '99'">
and t.postingTime = #{postingTime}
</if>
<if test="imageId != null and imageId != '' and imageId != 'null' and imageId != '99'">
and t.image_id = #{imageId}
</if>
<if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</if>
</select> </select>
<select id="selectHj" parameterType="java.util.Map" <select id="selectHj" parameterType="java.util.Map"

@ -253,7 +253,7 @@ public class ExcelController extends AbstractController {
Map<String, Object> returnMap = new HashMap<>(2); Map<String, Object> returnMap = new HashMap<>(2);
returnMap.put("id",tdxExcelExprortlog.getId()); returnMap.put("id",tdxExcelExprortlog.getId());
returnMap.put("setviceType","2"); returnMap.put("serviceType","2");
return ResponseEntity.ok(R.ok().put("data", returnMap)); return ResponseEntity.ok(R.ok().put("data", returnMap));
} catch (Exception e) { } catch (Exception e) {

@ -158,10 +158,18 @@ public class InvoiceDetailServiceImpl extends MpBaseServiceImpl<TDxRecordInvoice
// 取发票上的价税合计 // 取发票上的价税合计
String totalAmount = checkRecordVo.getTotalAmount(); String totalAmount = checkRecordVo.getTotalAmount();
// 价税合计小写 if(totalAmount != null && StringUtils.isNoneBlank(totalAmount)) {
checkInfo.put("detailAmountTotal", totalAmount); log.info("totalAmount={}",totalAmount);
// 价税合计大写 // 价税合计小写
checkInfo.put("stringTotalAmount", NumberToCN.number2CNMontrayUnit(new BigDecimal(totalAmount))); checkInfo.put("detailAmountTotal", totalAmount);
// 价税合计大写
checkInfo.put("stringTotalAmount", NumberToCN.number2CNMontrayUnit(new BigDecimal(totalAmount)));
}else{
// 价税合计小写
checkInfo.put("detailAmountTotal", "0");
// 价税合计大写
checkInfo.put("stringTotalAmount", "零");
}
// 发票票面信息 // 发票票面信息
checkInfo.put("invoiceSubjectList", JSON.toJSON(checkRecordVo)); checkInfo.put("invoiceSubjectList", JSON.toJSON(checkRecordVo));
// 机动车部分信息 // 机动车部分信息
@ -277,7 +285,7 @@ public class InvoiceDetailServiceImpl extends MpBaseServiceImpl<TDxRecordInvoice
} }
checkRecordVo.setTotalAmount(MathUtil.round(detailAmount.toPlainString())); checkRecordVo.setTotalAmount(MathUtil.round(detailAmount.toPlainString()));
} else { } else {
if (invoiceRecord.getTotalAmount() == null) { if (invoiceRecord.getTotalAmount() != null) {
BigDecimal add = invoiceRecord.getInvoiceAmount().add(invoiceRecord.getTaxAmount()); BigDecimal add = invoiceRecord.getInvoiceAmount().add(invoiceRecord.getTaxAmount());
checkRecordVo.setTotalAmount(MathUtil.round(add.toPlainString())); checkRecordVo.setTotalAmount(MathUtil.round(add.toPlainString()));
} else { } else {

@ -164,7 +164,7 @@ public class InvoiceQueryUtil {
if(FplxEnum.QDZZP.getFplxDm().equals(invoiceType) || FplxEnum.QDPP.getFplxDm().equals(invoiceType)){ if(FplxEnum.QDZZP.getFplxDm().equals(invoiceType) || FplxEnum.QDPP.getFplxDm().equals(invoiceType)){
requestData.put("invoiceType", "31"); requestData.put("invoiceType", "31");
requestData.put("invoiceCode", ""); requestData.put("invoiceCode", "");
requestData.put("invoiceNo", invoiceNo); requestData.put("invoiceNo", invoiceCode + invoiceNo);
}else { }else {
requestData.put("invoiceType", iu.getFplxdm()); requestData.put("invoiceType", iu.getFplxdm());
requestData.put("invoiceCode", invoiceCode); requestData.put("invoiceCode", invoiceCode);

@ -712,6 +712,16 @@ public class InterfaceController extends AbstractController {
returnResult = invoicePoolService.salsePush(globalInfo, requestParam, request, response, authorize); returnResult = invoicePoolService.salsePush(globalInfo, requestParam, request, response, authorize);
break; break;
// 接口编码不存在 // 接口编码不存在
// 获取单张发票
case "INVOICE.SINGLEINVOICECHECK":
returnResult = gatherService.singleInvoiceChenck(globalInfo, requestParam, request, response, authorize);
break;
// 获取单张发票
case "INVOICE.SYNCINVOICEINFO":
returnResult = gatherService.syncInvoiceInfo(globalInfo, requestParam, request, response, authorize);
break;
default: default:
returnResult = authStatusService.getInterfaceCodeError(globalInfo); returnResult = authStatusService.getInterfaceCodeError(globalInfo);
break; break;

@ -92,7 +92,11 @@ public class FpqsServiceImpl extends MpBaseServiceImpl<SignRecordInvoiceDao, TDx
// 1、基础信息校验 // 1、基础信息校验
String note =""; String note ="";
String uuid =""; String uuid ="";
uuid = pramsMap.get("invoiceCode") + pramsMap.get("invoiceNo"); if(pramsMap.get("invoiceCode") != null) {
uuid = pramsMap.get("invoiceCode") + pramsMap.get("invoiceNo");
}else{
uuid = pramsMap.get("invoiceNo");
}
if(!FplxEnum.QDZZP.getFplxDm().equals(invoiceType)){ if(!FplxEnum.QDZZP.getFplxDm().equals(invoiceType)){
note = signRulesUtils.validateInvoiceInfo(pramsMap.get("invoiceCode"), pramsMap.get("invoiceNo")); note = signRulesUtils.validateInvoiceInfo(pramsMap.get("invoiceCode"), pramsMap.get("invoiceNo"));
} }

@ -59,6 +59,7 @@ import javax.annotation.Resource;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.security.acl.LastOwnerException;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
@ -3386,7 +3387,13 @@ public class SignFpqsServiceImpl extends MpBaseServiceImpl<SignRecordInvoiceDao,
for (int i = 0; i < resultList.size(); i++) { for (int i = 0; i < resultList.size(); i++) {
QsExcelEntity qsExcelEntity = new QsExcelEntity(); QsExcelEntity qsExcelEntity = new QsExcelEntity();
BeanUtils.copyProperties(qsExcelEntity,resultList.get(i)); BeanUtils.copyProperties(qsExcelEntity,resultList.get(i));
qsExcelEntity.setInvoiceAmount(AmountFormatUtil.fmtMicrometer(MathUtil.round(resultList.get(i).getTotalAmount().toPlainString())));
log.info("导出的发票数据魏:{}",JSONObject.toJSONString(resultList.get(i)));
log.info("totalAmount={}",resultList.get(i).getTotalAmount());
if(resultList.get(i) != null && resultList.get(i).getInvoiceAmount() != null) {
qsExcelEntity.setInvoiceAmount(AmountFormatUtil.fmtMicrometer(MathUtil.round(resultList.get(i).getInvoiceAmount().toPlainString())));
}
excelList.add(qsExcelEntity); excelList.add(qsExcelEntity);
} }
} }

Loading…
Cancel
Save