ariesy 手工认证和认证查询界面增加税率筛选条件

release
yefei 2 years ago
parent 3bb9d43161
commit 76a3e14e17
  1. 64
      dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java
  2. 12
      dxhy-base/src/main/resources/mapper/BaseFpZhMapper.xml
  3. 12
      dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml

@ -141,6 +141,7 @@ public class BaseInvoiceController extends AbstractController {
String businessCode = (String)map.get("businessCode");
String qsr = (String)map.get("qsr");
String rzhr = (String)map.get("rzhr");
String taxRate = (String) map.get("taxRate");
String inAccountStatus = (String)map.get("inAccountStatus");
int curr = (int)map.get("curr");
int size = (int)map.get("size");
@ -225,6 +226,12 @@ public class BaseInvoiceController extends AbstractController {
pramsMap.put("companyCode",companyCode);
}
if (!StringUtils.isNotBlank(taxRate) && !"99".equals(taxRate)){
List<String> rates = new ArrayList<>();
rates = convertRates(taxRate,rates);
pramsMap.put("taxRate",rates);
}
if (!StringHelper.isBlank(invoiceType)) {
if (!"99".equals(invoiceType)) {
pramsMap.put("invoiceType", invoiceType);
@ -503,6 +510,7 @@ public class BaseInvoiceController extends AbstractController {
String suspendStatus = (String) map.get("suspendStastus");
String suspendDate = (String) map.get("suspendDate");
String bzr = (String) map.get("bzr");
String taxRate = (String) map.get("taxRate");
if (StringUtils.isNotEmpty(suspendDate) && suspendDate.length() >7){
suspendDate = suspendDate.substring(0,7);
}
@ -566,6 +574,12 @@ public class BaseInvoiceController extends AbstractController {
if (!StringUtils.isNotBlank(gfsh)){
pramsMap.put("sign","88");
}
if (!StringUtils.isNotBlank(taxRate) && !"99".equals(taxRate)){
List<String> rates = new ArrayList<>();
rates = convertRates(taxRate,rates);
pramsMap.put("taxRate",rates);
}
List<String> gfshList = new ArrayList<>();
if (!"99".equals(gfsh) && StringUtils.isNotBlank(gfsh)) {
gfshList.add(gfsh);
@ -694,6 +708,56 @@ public class BaseInvoiceController extends AbstractController {
}
private List<String> convertRates(String taxRate,List<String> rates) {
switch (taxRate) {
case "0":
rates.add("0");
break;
case "1.5":
rates.add("1.5");
break;
case "2":
rates.add("2");
rates.add("0.02");
break;
case "3":
rates.add("3");
rates.add("0.03");
break;
case "5":
rates.add("5");
rates.add("0.05");
break;
case "6":
rates.add("6");
rates.add("0.06");
break;
case "9":
rates.add("9");
rates.add("0.09");
break;
case "10":
rates.add("10");
rates.add("0.10");
break;
case "13":
rates.add("13");
rates.add("0.13");
break;
case "16":
rates.add("16");
rates.add("0.16");
break;
case "17":
rates.add("17");
rates.add("0.17");
break;
default:
break;
}
return rates;
}
public boolean checkList(List<String> list) {
boolean flag =false;
if (list == null || list.isEmpty()){

@ -235,6 +235,12 @@
<if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</if>
<if test="taxRate != null and taxRate != '' and taxRate != 'null' and taxRate != '99'">
and (t.tax_rate in
<foreach collection="rates" index="index" item="taxRate" separator="," open="(" close=")">
#{taxRate}
</foreach>
</if>
order by t.rzh_date desc,t.invoice_date desc
</select>
<select id="selectByPramsMap" parameterType="java.util.Map"
@ -401,6 +407,12 @@
<if test="bzdh != null and bzdh != '' and bzdh != 'null' and bzdh != '99'">
and t.bzdh = #{bzdh}
</if>
<if test="taxRate != null and taxRate != '' and taxRate != 'null' and taxRate != '99'">
and (t.tax_rate in
<foreach collection="rates" index="index" item="taxRate" separator="," open="(" close=")">
#{taxRate}
</foreach>
</if>
<if test="bzr != null and bzr != '' and bzr != 'null'">
and t.bzr like concat('%',#{bzr},'%')
</if>

@ -136,6 +136,12 @@
<if test="bzdh != null and bzdh != '' and bzdh != 'null' and bzdh != '99'">
and t.bzdh = #{bzdh}
</if>
<if test="taxRate != null and taxRate != '' and taxRate != 'null' and taxRate != '99'">
and (t.tax_rate in
<foreach collection="rates" index="index" item="taxRate" separator="," open="(" close=")">
#{taxRate}
</foreach>
</if>
<if test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99' and inAccountStatus == '1'.toString()">
and t.inaccount_status = #{inAccountStatus}
</if>
@ -509,6 +515,12 @@
<if test="bzdh != null and bzdh != '' and bzdh != 'null' and bzdh != '99'">
and t.bzdh = #{bzdh}
</if>
<if test="taxRate != null and taxRate != '' and taxRate != 'null' and taxRate != '99'">
and (t.tax_rate in
<foreach collection="rates" index="index" item="taxRate" separator="," open="(" close=")">
#{taxRate}
</foreach>
</if>
<if test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99' and inAccountStatus == '1'.toString()">
and t.inaccount_status = #{inAccountStatus}
</if>

Loading…
Cancel
Save