Merge branches '0531L' and '0604KY' of http://192.168.12.182/invoice/pt into 0531L

release
yishiqihuasheng 2 years ago
commit a8bfd3fade
  1. 4
      dxhy-base/src/main/resources/mapper/BaseFpZhMapper.xml
  2. 16
      dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml
  3. 39
      dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtFpzhcxController.java
  4. 56
      dxhy-extend/src/main/resources/mapper/ExtBbfpzhMapper.xml
  5. 2
      dxhy-extend/src/main/resources/mapper/ExtBbycfpcxMapper.xml

@ -73,7 +73,7 @@
bdk_date,t.rzh_back_msg,t.in_account_status,t.payment_status,date_format(t.payment_date,'%Y-%m-%d')payment_date,
voucher_number,t.ele_invoice_no, sn_voucher_number, account_period, posting_time ,image_id
from t_dx_record_invoice t
WHERE date_format(t.invoice_date,'%Y-%m-%d') between #{kpksrq} and #{kpjsrq}
WHERE t.invoice_date 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.bdk_status in ('1','2')
and t.export_mark = '0'
@ -353,7 +353,7 @@
resultMap="RzcxhjResultMap" databaseId="mysql">
select count(1) hjsl,sum(t.invoice_amount)hjje,sum(t.tax_amount)hjse
from t_dx_record_invoice t
WHERE date_format(t.invoice_date,'%Y-%m-%d') between #{kpksrq} and #{kpjsrq}
WHERE t.invoice_date 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.auth_status != '0'
and t.bdk_status in ('1','2')

@ -71,7 +71,7 @@
t.inaccount_status,t.payment_status,DATE_FORMAT(t.payment_date,'%Y-%m-%d')payment_date,t.settlement_no,t.ele_invoice_no
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
WHERE date_format(t.invoice_date,'%Y-%m-%d') between #{kpksrq} and #{kpjsrq}
WHERE t.invoice_date 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.rzh_yesorno = '0'
and t.auth_status in('0','5','6')
@ -81,14 +81,14 @@
and t.invoice_status in ('0','7')
and t.invoice_amount>0
and t.tax_amount>=0
and date_format(t.invoice_date,'%Y%m%d') between c.select_start_date and c.select_end_date
and t.invoice_date between c.select_start_date and c.select_end_date
and d.tj_status in('0','3')
</if>
<if test="sfkrz != '99' and sfkrz != null and sfkrz != '' and sfkrz != 'null' and sfkrz == '0'.toString()">
and (t.invoice_status in ('1','2','3','4','8','80') or t.invoice_amount &lt;0 or t.tax_amount &lt;0 or
date_format(t.invoice_date,'%Y%m%d') &lt;= c.select_start_date or
date_format(t.invoice_date,'%Y%m%d') &gt;=
t.invoice_date &lt;= c.select_start_date or
t.invoice_date &gt;=
c.select_end_date or d.tj_status in ('1','2'))
</if>
@ -395,7 +395,7 @@
select count(1) hjsl,sum(t.invoice_amount)hjje,sum(t.tax_amount)hjse
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
WHERE date_format(t.invoice_date,'%Y-%m-%d') between #{kpksrq} and #{kpjsrq}
WHERE t.invoice_date 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.rzh_yesorno = '0'
and t.auth_status in('0','5','6')
@ -408,14 +408,14 @@
and t.invoice_status in ('0','7')
and t.invoice_amount>0
and t.tax_amount>=0
and date_format(t.invoice_date,'%Y%m%d') between c.select_start_date and c.select_end_date
and t.invoice_date between c.select_start_date and c.select_end_date
and d.tj_status in('0','3')
</if>
<if test="sfkrz != '99' and sfkrz != null and sfkrz != '' and sfkrz != 'null' and sfkrz == '0'.toString()">
and (t.invoice_status in ('1','2','3','4','8','80') or t.invoice_amount &lt;0 or t.tax_amount &lt;0 or
date_format(t.invoice_date,'%Y%m%d') &lt;= c.select_start_date or
date_format(t.invoice_date,'%Y%m%d') &gt;=
t.invoice_date &lt;= c.select_start_date or
t.invoice_date &gt;=
c.select_end_date or d.tj_status in ('1','2'))
</if>

@ -3,6 +3,7 @@ package com.dxhy.extend.controller;
import com.dxhy.common.aspect.SysLog;
import com.dxhy.common.constant.CommonConstants;
import com.dxhy.common.controller.AbstractController;
import com.dxhy.common.util.StringHelper;
import com.dxhy.common.util.UserInfoUtil;
import com.dxhy.common.utils.DateUtils;
import com.dxhy.common.utils.R;
@ -115,6 +116,25 @@ public class ExtFpzhcxController extends AbstractController {
}
pramsMap.put("gfsh", gfshList);
boolean flag = checkList(gfshList);
if (flag){
pramsMap.put("sign","88");
}else {
pramsMap.put("sign","99");
}
String companyCode = (String) pramsMap.get("companyCode");
if (org.apache.commons.lang3.StringUtils.isNotBlank(companyCode) && "99".equals(companyCode)){
pramsMap.put("companyCodes",getUserInfo().getCompanyCodes());
log.info("组织机构====>{}",pramsMap.get("companyCodes"));
}
if (StringUtils.isNotBlank(companyCode)){
pramsMap.put("companyCode",companyCode);
}else {
return ResponseEntity.ok(R.error("所属组织不能为空"));
}
if (pramsMap.get("kpksrq") != null && !"".equals(pramsMap.get("kpksrq"))) {
pramsMap.put("kpksrq", DateUtils.getMorning(DateUtils.strToDate(pramsMap.get("kpksrq").toString())));
}
@ -199,6 +219,25 @@ public class ExtFpzhcxController extends AbstractController {
}
public boolean checkList(List<String> list) {
boolean flag =false;
if (list == null || list.isEmpty()){
flag = true;
}else {
String s = list.toString().replace("[","").replace("]","");
if (StringHelper.isBlank(s)){
flag = true;
}
if (StringHelper.isNotBlank(s) && s.contains(",")){
String replace = s.replace(",", "");
if (StringHelper.isBlank(replace)){
flag = true;
}
}
}
return flag;
}
/**
* 报表异常发票查询
*

@ -69,11 +69,30 @@
t.settlement_no,t.inaccount_status,t.bzdh,
t.settlement_status,t.voucher_number,t.total_amount,t.sn_voucher_number,t.posting_time,t.image_id,t.account_period
from t_dx_record_invoice t
WHERE t.company = #{company} and t.invoice_date between #{kpksrq} and #{kpjsrq}
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
WHERE t.company = #{company}
and t.invoice_date between #{kpksrq} and #{kpjsrq}
<if test="sign != '88'">
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode == '99'">
and (t.comp_code in
<foreach collection="companyCodes" index="index" item="companyCode" separator="," open="(" close=")">
#{companyCode}
</foreach>
or t.comp_code is null or t.comp_code = ''
)
</if>
<if test="companyCode != null and companyCode != '99' and companyCode != '88' and companyCode != '' and companyCode != 'null'" >
and t.comp_code = #{companyCode}
</if>
<if test="companyCode != null and companyCode != '' and companyCode == '88'">
and (t.comp_code = '' or t.comp_code is null)
</if>
<if test="bzdh != null and bzdh != '' and bzdh != 'null'">
and t.bzdh = #{bzdh}
</if>
@ -331,10 +350,29 @@
select count(1) hjsl,sum(t.invoice_amount)hjje,sum(t.tax_amount)hjse
from t_dx_record_invoice t
where t.invoice_date between #{kpksrq} and #{kpjsrq}
and t.company = #{company} and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
and t.company = #{company}
<if test="sign != '88'">
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode == '99'">
and (t.comp_code in
<foreach collection="companyCodes" index="index" item="companyCode" separator="," open="(" close=")">
#{companyCode}
</foreach>
or t.comp_code is null or t.comp_code = ''
)
</if>
<if test="companyCode != null and companyCode != '99' and companyCode != '88' and companyCode != '' and companyCode != 'null'" >
and t.comp_code = #{companyCode}
</if>
<if test="companyCode != null and companyCode != '' and companyCode == '88'">
and (t.comp_code = '' or t.comp_code is null)
</if>
<if
test="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' and invoiceStatus != '99'">
and t.invoice_status = #{invoiceStatus}

@ -182,7 +182,7 @@
where t.invoice_status != '0'
and t.invoice_type in ('01','03','08','14','31')
and t.company = #{company}
and DATE_FORMAT(t.invoice_date,'%Y-%m-%d') between #{kpksrq} and #{kpjsrq}
and t.invoice_date between #{kpksrq} and #{kpjsrq}
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}

Loading…
Cancel
Save