Compare commits

...

11 Commits

  1. 2
      dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java
  2. 38
      dxhy-base/src/main/resources/mapper/BaseFpZhMapper.xml
  3. 3
      dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml
  4. 2
      dxhy-core/src/main/java/com/dxhy/core/thread/RzFpxxExportThread.java
  5. 2
      dxhy-core/src/main/resources/mapper/ExtPaperMapper.xml
  6. 23
      dxhy-core/src/main/resources/mapper/FpZhMapper.xml
  7. 4
      dxhy-core/src/main/resources/mapper/frJob/QueryDetailDataDao.xml
  8. 11
      dxhy-erp/src/main/java/com/dxhy/erp/service/impl/InvoicePoolServiceImpl.java

@ -313,7 +313,7 @@ public class BaseInvoiceController extends AbstractController {
if (!"99".equals(rzclzt)) {
pramsMap.put("rzclzt", rzclzt);
} else {
pramsMap.put("rzclzt", "");
pramsMap.put("rzclzt", "99");
}
} else {
return ResponseEntity.ok(R.error("认证状态不能为空!"));

@ -75,12 +75,29 @@
from t_dx_record_invoice t
WHERE t.invoice_date between #{kpksrq} and #{kpjsrq}
and t.invoice_type in('01','03','08','14','31','283','161','183','185')
and t.bdk_status in ('1','2')
and t.export_mark = '0'
and t.auth_status in ('0','2','3','4','5','6')
and t.company = #{company}
and t.gf_tax_no = #{gfsh}
and t.comp_code = #{companyCode}
<if test="rzclzt != null and rzclzt != '' and rzclzt == '4'.toString()">
and t.bdk_status in ('1','2')
</if>
<if test="rzclzt != null and rzclzt != '' and (rzclzt == '0'.toString() or rzclzt == '6'.toString())">
AND t.inaccount_status = '1'
AND t.rzh_yesorno = '0'
<if test=" bzdh == ''">
and t.bzdh is not null
</if>
</if>
<if test="rzclzt != null and rzclzt != '' and rzclzt == '99'">
AND (
(t.auth_status = '4' and t.bdk_status IN ( '1', '2' ))
or (t.auth_status in ('0','6') AND t.inaccount_status = '1' AND t.rzh_yesorno = '0' and t.bzdh is not null)
or t.auth_status in ('2','3','5')
)
</if>
<if test="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' ">
and t.invoice_status = #{invoiceStatus}
</if>
@ -361,9 +378,26 @@
and t.comp_code = #{companyCode}
and t.invoice_type in('01','03','08','14','31','283','161','183','185')
and t.auth_status in ('0','2','3','4','5','6')
and t.bdk_status in ('1','2')
and t.export_mark = '0'
and t.company =#{company}
<if test="rzclzt != null and rzclzt != '' and rzclzt == '4'.toString()">
and t.bdk_status in ('1','2')
</if>
<if test="rzclzt != null and rzclzt != '' and (rzclzt == '0'.toString() or rzclzt == '6'.toString())">
AND t.inaccount_status = '1'
AND t.rzh_yesorno = '0'
<if test=" bzdh == ''">
and t.bzdh is not null
</if>
</if>
<if test="rzclzt != null and rzclzt != '' and rzclzt == '99'">
AND (
(t.auth_status = '4' and t.bdk_status IN ( '1', '2' ))
or (t.auth_status in ('0','6') AND t.inaccount_status = '1' AND t.rzh_yesorno = '0' and t.bzdh is not null)
or t.auth_status in ('2','3','5')
)
</if>
<if test="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' ">
and t.invoice_status = #{invoiceStatus}
</if>

@ -523,6 +523,9 @@
<if test="bzdh != null and bzdh != '' and bzdh != 'null' and bzdh != '99'">
and t.bzdh = #{bzdh}
</if>
<if test=" bzdh == ''">
and t.bzdh is not null
</if>
<if test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99' and inAccountStatus == '1'.toString()">
and t.inaccount_status = #{inAccountStatus}
</if>

@ -245,7 +245,7 @@ public class RzFpxxExportThread extends BaseThread {
if (!"99".equals(rzclzt) && StringUtils.isNotBlank(rzclzt)) {
pramsMap.put("rzclzt", rzclzt);
} else {
pramsMap.put("rzclzt", "");
pramsMap.put("rzclzt", "99");
}
if (!StringUtils.isBlank(invoiceNo)) {
if(invoiceNo.length()==8){

@ -457,7 +457,6 @@
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != '99' and companyCode != '88'">
and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null)
</if>
GROUP BY t.uuid
ORDER BY t.create_date DESC
</select>
@ -735,7 +734,6 @@
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != '99' and companyCode == '88'">
and (t.comp_code = '' or t.comp_code is null)
</if>
GROUP BY t.uuid
ORDER BY t.create_date DESC
</select>
</mapper>

@ -106,13 +106,29 @@
from t_dx_record_invoice t
WHERE t.invoice_date between #{kpksrq} and #{kpjsrq}
and t.invoice_type in ('01','03','08','14','31','283','161','183','185')
and t.bdk_status in ('1','2')
and t.export_mark = '0'
and t.auth_status in ('0','2','3','4','5','6')
and t.company = #{company}
and t.gf_tax_no = #{gfsh}
and t.comp_code = #{companyCode}
<if test="rzclzt != null and rzclzt != '' and rzclzt == '4'.toString()">
and t.bdk_status in ('1','2')
</if>
<if test="rzclzt != null and rzclzt != '' and (rzclzt == '0'.toString() or rzclzt == '6'.toString())">
AND t.inaccount_status = '1'
AND t.rzh_yesorno = '0'
<if test=" bzdh == ''">
and t.bzdh is not null
</if>
</if>
<if test="rzclzt != null and rzclzt != '' and rzclzt == '99'">
AND (
(t.auth_status = '4' and t.bdk_status IN ( '1', '2' ))
or (t.auth_status in ('0','6') AND t.inaccount_status = '1' AND t.rzh_yesorno = '0' and t.bzdh is not null)
or t.auth_status in ('2','3','5')
)
</if>
<if test="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' ">
and t.invoice_status = #{invoiceStatus}
</if>
@ -155,9 +171,12 @@
<if test="imageId != null and imageId != '' and imageId != 'null' ">
and t.image_id = #{imageId}
</if>
<if test="rzclzt !=null and rzclzt != ''">
<if test="rzclzt == '0'.toString() or rzclzt == '4'.toString() or rzclzt == '5'.toString() or rzclzt == '6'.toString()">
and t.auth_status = #{rzclzt}
</if>
<if test="rzclzt == '1'.toString() ">
and (t.auth_status = '2' or t.auth_status = '3')
</if>
<if test="rzlx!=null and rzlx!=''">
and t.bdk_status = #{rzlx}
</if>

@ -124,7 +124,7 @@
and t.invoice_type in ('01','03','08','14','31','183','185')
and d.goods_name != '(详见销货清单)'
and t.invoice_status != '2'
group by d.uuid,d.tax_rate
group by d.uuid,v.kjkmbh
</select>
<select id="getDataFromRecordXx" resultMap="RecordToQuery">
@ -283,7 +283,7 @@
and t.invoice_type in ('01','03','08','14','31','183','185')
and d.goods_name != '(详见销货清单)'
and t.invoice_status != '2'
group by d.uuid,d.tax_rate
group by d.uuid,v.kjkmbh
</select>

@ -1945,11 +1945,12 @@ public class InvoicePoolServiceImpl implements InvoicePoolService {
public ReturnStateInfo getCheckData(SalesInvoicePushInfos info) {
ReturnStateInfo run = new ReturnStateInfo();
if (StringUtils.isBlank(info.getInvoiceCode())) {
run.setReturnCode(ReturnCodeEnum.FPDMBNWK.getFhzDm());
run.setReturnMessage(ReturnCodeEnum.FPDMBNWK.getFhzMc(ReturnCodeEnum.FPDMBNWK.getIndex()));
return run;
}
//兼容全电类型,不校验发票代码
// if (StringUtils.isBlank(info.getInvoiceCode())) {
// run.setReturnCode(ReturnCodeEnum.FPDMBNWK.getFhzDm());
// run.setReturnMessage(ReturnCodeEnum.FPDMBNWK.getFhzMc(ReturnCodeEnum.FPDMBNWK.getIndex()));
// return run;
// }
if (StringUtils.isBlank(info.getInvoiceNo())) {
run.setReturnCode(ReturnCodeEnum.FPHMBNWK.getFhzDm());
run.setReturnMessage(ReturnCodeEnum.FPHMBNWK.getFhzMc(ReturnCodeEnum.FPHMBNWK.getIndex()));

Loading…
Cancel
Save