进项和销项票池不需要上级权限

release
yishiqihuasheng 2 years ago
parent 44ae9a3b7c
commit 596a8ef304
  1. 44
      dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java
  2. 39
      dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtInvoicePoolController.java
  3. 44
      dxhy-extend/src/main/resources/mapper/ExtInvoicePoolMapper.xml

@ -199,6 +199,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)){
@ -566,26 +573,10 @@ public class BaseInvoiceController extends AbstractController {
}
pramsMap.put("gfsh", gfshList);
boolean flag = false;
if (gfshList == null || gfshList.isEmpty()){
flag = true;
}else {
String s = gfshList.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;
}
}
}
boolean flag = checkList(gfshList);
log.info("gfshList.size(){}",gfshList.size());
if (flag){
pramsMap.put("sign","88");
log.info("登陆账号无税号");
}
@ -699,6 +690,25 @@ public class BaseInvoiceController 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;
}
/**
* 智能勾选查询 qsfs 默认传9
*

@ -66,9 +66,14 @@ public class ExtInvoicePoolController extends AbstractController {
// }
// }
gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
if (gfshList.size() == 0) {
return ResponseEntity.ok(R.ok().put("data", ""));
boolean flag = checkList(gfshList);
if (flag){
pramsMap.put("sign","88");
log.info("登陆账号无税号");
}
// if (gfshList.size() == 0) {
// return ResponseEntity.ok(R.ok().put("data", ""));
// }
pramsMap.put("gfsh", gfshList);
if (pramsMap.get("cjksyf") != null && !"".equals(pramsMap.get("cjksyf"))) {
pramsMap.put("cjksyf", DateUtils.getMorning(DateUtils.strToDate(pramsMap.get("cjksyf").toString())));
@ -219,10 +224,16 @@ public class ExtInvoicePoolController extends AbstractController {
// return ResponseEntity.ok(R.ok().put("data", ""));
// }
// }
gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
if (gfshList.size() == 0) {
return ResponseEntity.ok(R.ok().put("data", ""));
}
boolean flag = checkList(gfshList);
if (flag){
pramsMap.put("sign","88");
log.info("登陆账号无税号");
}
// if (gfshList.size() == 0) {
// return ResponseEntity.ok(R.ok().put("data", ""));
// }
pramsMap.put("taxno", gfshList);
if (pramsMap.get("cjksyf") != null && !"".equals(pramsMap.get("cjksyf"))) {
pramsMap.put("cjksyf", DateUtils.getMorning(DateUtils.strToDate(pramsMap.get("cjksyf").toString())));
@ -327,4 +338,22 @@ public class ExtInvoicePoolController extends AbstractController {
System.out.println(replace);
}
}
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,10 +69,13 @@
like
CONCAT('%',#{keyWord},'%')
</if>
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<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="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' ">
and t.invoice_type = #{invoiceType}
</if>
@ -218,10 +221,13 @@
like
CONCAT('%',#{keyWord},'%')
</if>
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<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="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' ">
and t.invoice_type = #{invoiceType}
</if>
@ -506,10 +512,13 @@
like
CONCAT('%',#{keyWord},'%')
</if>
and t.xf_tax_no in
<foreach collection="taxno" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="sign != '88'">
and t.xf_tax_no in
<foreach collection="taxno" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if
test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' ">
and t.invoice_type = #{invoiceType}
@ -617,10 +626,13 @@
like
CONCAT('%',#{keyWord},'%')
</if>
and t.xf_tax_no in
<foreach collection="taxno" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="sign != '88'">
and t.xf_tax_no in
<foreach collection="taxno" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if
test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' ">
and t.invoice_type = #{invoiceType}

Loading…
Cancel
Save