Merge branches '0614-增加税率筛选条件' and 'test' of http://192.168.12.182/invoice/pt into test

 Conflicts:
	dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java
	dxhy-base/src/main/resources/mapper/BaseFpZhMapper.xml
	dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml
release
yefei 2 years ago
commit 982c6d7d4c
  1. 98
      dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java
  2. 6
      dxhy-base/src/main/resources/mapper/BaseFpZhMapper.xml
  3. 11
      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");
@ -203,6 +204,13 @@ public class BaseInvoiceController extends AbstractController {
gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
}
pramsMap.put("gfsh", gfshList);
boolean flag = checkList(gfshList);
if (flag){
pramsMap.put("sign","88");
log.info("登陆账号无税号");
}
//所属组织
// List<String> companyCodeList = new ArrayList<>();
// if (StringUtils.isNotBlank(companyCode)){
@ -218,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);
@ -496,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);
}
@ -559,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);
@ -570,6 +591,14 @@ public class BaseInvoiceController extends AbstractController {
}
pramsMap.put("gfsh", gfshList);
boolean flag = checkList(gfshList);
log.info("gfshList.size(){}",gfshList.size());
if (flag){
pramsMap.put("sign","88");
log.info("登陆账号无税号");
}
//所属组织
// List<String> companyCodeList = new ArrayList<>();
// if (StringUtils.isNotBlank(companyCode) && !"99".equals(companyCode)){
@ -679,6 +708,75 @@ 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()){
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;
}
/**
* 智能勾选查询 qsfs 默认传9
*

@ -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>
</select>
<!-- order by t.rzh_date desc,t.invoice_date desc-->
<select id="selectByPramsMap" parameterType="java.util.Map"

@ -139,6 +139,12 @@
<if test="bzdh == null or bzdh == '' or bzdh == 'null' or bzdh == '99'">
and t.bzdh is not null
</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>
@ -226,6 +232,7 @@
<!-- <if test="qsksrq==null or qsksrq=='' or qsjsrq==null or qsjsrq==''">-->
<!-- order by t.invoice_date desc-->
<!-- </if>-->
order by t.bzdh desc
</select>
<select id="selectDksh" parameterType="java.util.Map"
resultType="com.dxhy.base.entity.BaseTDxDkCount"
@ -511,9 +518,6 @@
<if test="bzdh != null and bzdh != '' and bzdh != 'null' and bzdh != '99'">
and t.bzdh = #{bzdh}
</if>
<if test="bzdh == null or bzdh == '' or bzdh == 'null' or bzdh == '99'">
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>
@ -558,6 +562,7 @@
<if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</if>
order by t.bzdh desc
</select>
<select id="selectHj" parameterType="java.util.Map"

Loading…
Cancel
Save