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

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()); gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
} }
pramsMap.put("gfsh", gfshList); pramsMap.put("gfsh", gfshList);
boolean flag = checkList(gfshList);
if (flag){
pramsMap.put("sign","88");
log.info("登陆账号无税号");
}
//所属组织 //所属组织
// List<String> companyCodeList = new ArrayList<>(); // List<String> companyCodeList = new ArrayList<>();
// if (StringUtils.isNotBlank(companyCode)){ // if (StringUtils.isNotBlank(companyCode)){
@ -566,26 +573,10 @@ public class BaseInvoiceController extends AbstractController {
} }
pramsMap.put("gfsh", gfshList); pramsMap.put("gfsh", gfshList);
boolean flag = false; boolean flag = checkList(gfshList);
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;
}
}
}
log.info("gfshList.size(){}",gfshList.size()); log.info("gfshList.size(){}",gfshList.size());
if (flag){ if (flag){
pramsMap.put("sign","88"); pramsMap.put("sign","88");
log.info("登陆账号无税号"); 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 * 智能勾选查询 qsfs 默认传9
* *

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

Loading…
Cancel
Save