手工认证和认证查询修改没有税号公司需要上级权限问题

release
yishiqihuasheng 2 years ago
parent 9a57988622
commit 95272acd4d
  1. 18
      dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java
  2. 1
      dxhy-base/src/main/java/com/dxhy/base/service/fpxxrz/BaseRzFpxxServiceImpl.java
  3. 49
      dxhy-base/src/main/resources/mapper/BaseFpZhMapper.xml
  4. 50
      dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml
  5. 34
      dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtInvoicePoolController.java
  6. 32
      dxhy-extend/src/main/resources/mapper/ExtInvoicePoolMapper.xml

@ -189,6 +189,9 @@ public class BaseInvoiceController extends AbstractController {
pramsMap.put("voucherNumber", map.get("voucherNumber")); pramsMap.put("voucherNumber", map.get("voucherNumber"));
List<Tax> taxList = getUserInfo().getOrg(); List<Tax> taxList = getUserInfo().getOrg();
pramsMap.put("taxList", taxList); pramsMap.put("taxList", taxList);
if (!StringUtils.isNotBlank(gfsh)){
pramsMap.put("sign","88");
}
List<String> gfshList = new ArrayList<>(); List<String> gfshList = new ArrayList<>();
if (!"99".equals(gfsh) && StringUtils.isNotBlank(gfsh)) { if (!"99".equals(gfsh) && StringUtils.isNotBlank(gfsh)) {
gfshList.add(gfsh); gfshList.add(gfsh);
@ -203,8 +206,12 @@ public class BaseInvoiceController extends AbstractController {
// }else { // }else {
// companyCodeList = getUserInfo().getCompanyCodes(); // companyCodeList = getUserInfo().getCompanyCodes();
// } // }
if (StringHelper.isNotBlank(companyCode) && "99".equals(companyCode)){
pramsMap.put("companyCodes",getUserInfo().getCompanyCodes());
log.info("组织机构====>{}",pramsMap.get("companyCodes"));
}
if (StringUtils.isNotBlank(companyCode)){ if (StringUtils.isNotBlank(companyCode)){
pramsMap.put("companyCodes",companyCode); pramsMap.put("companyCode",companyCode);
} }
if (!StringHelper.isBlank(invoiceType)) { if (!StringHelper.isBlank(invoiceType)) {
@ -545,6 +552,9 @@ public class BaseInvoiceController extends AbstractController {
pramsMap.put("invoiceSource", invoiceSource); pramsMap.put("invoiceSource", invoiceSource);
} }
} }
if (!StringUtils.isNotBlank(gfsh)){
pramsMap.put("sign","88");
}
List<String> gfshList = new ArrayList<>(); List<String> gfshList = new ArrayList<>();
if (!"99".equals(gfsh) && StringUtils.isNotBlank(gfsh)) { if (!"99".equals(gfsh) && StringUtils.isNotBlank(gfsh)) {
gfshList.add(gfsh); gfshList.add(gfsh);
@ -561,8 +571,12 @@ public class BaseInvoiceController extends AbstractController {
// companyCodeList = getUserInfo().getCompanyCodes(); // companyCodeList = getUserInfo().getCompanyCodes();
// log.info("获取到的组织信息{}",companyCodeList); // log.info("获取到的组织信息{}",companyCodeList);
// } // }
if (StringHelper.isNotBlank(companyCode) && "99".equals(companyCode)){
pramsMap.put("companyCodes",getUserInfo().getCompanyCodes());
log.info("组织机构====>{}",pramsMap.get("companyCodes"));
}
if (StringUtils.isNotBlank(companyCode)){ if (StringUtils.isNotBlank(companyCode)){
pramsMap.put("companyCodes",companyCode); pramsMap.put("companyCode",companyCode);
} }

@ -96,6 +96,7 @@ public class BaseRzFpxxServiceImpl extends MpBaseServiceImpl<BaseFpxxZhDao, Base
json.put("hjje", AmountFormatUtil.fmtMicrometer(hjje)); json.put("hjje", AmountFormatUtil.fmtMicrometer(hjje));
json.put("hjse", AmountFormatUtil.fmtMicrometer(hjse)); json.put("hjse", AmountFormatUtil.fmtMicrometer(hjse));
} }
List<String> gfshList1 = new ArrayList<>(); List<String> gfshList1 = new ArrayList<>();
List<BaseTDxDkCount> curList = baseTDxRecordInvoiceDao.selectDksh(pramsMap); List<BaseTDxDkCount> curList = baseTDxRecordInvoiceDao.selectDksh(pramsMap);
log.info("认证查询列表-返回的所属期列表为:{}",curList); log.info("认证查询列表-返回的所属期列表为:{}",curList);

@ -80,15 +80,25 @@
and t.auth_status != '0' and t.auth_status != '0'
and t.rzh_yesorno != '0' and t.rzh_yesorno != '0'
and t.company = #{company} and t.company = #{company}
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="companyCodes != null and companyCodes != '99' and companyCodes != '88' and companyCodes != '' and companyCodes != 'null'" > <if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode == '99'">
and t.comp_code = #{companyCodes} 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>
<if test="companyCodes != null and companyCodes != '' and companyCodes == '88'"> <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) and (t.comp_code = '' or t.comp_code is null)
</if> </if>
@ -351,14 +361,25 @@
and t.export_mark = '0' and t.export_mark = '0'
and t.rzh_yesorno != '0' and t.rzh_yesorno != '0'
and t.company =#{company} and t.company =#{company}
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}
<if test="companyCodes != null and companyCodes != '99' and companyCodes != '88' and companyCodes != '' and companyCodes != 'null'" > </foreach>
and t.comp_code = #{companyCodes} </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>
<if test="companyCodes != null and companyCodes != '' and companyCodes == '88'"> <if test="companyCode != null and companyCode != '' and companyCode == '88'">
and (t.comp_code = '' or t.comp_code is null) and (t.comp_code = '' or t.comp_code is null)
</if> </if>
<if test="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' "> <if test="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' ">

@ -92,18 +92,29 @@
c.select_end_date or d.tj_status in ('1','2')) c.select_end_date or d.tj_status in ('1','2'))
</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>
<!-- and t.comp_code in--> <!-- and t.comp_code in-->
<!-- <foreach collection="companyCodes" index="index" item="companyCode" open="(" close=")" separator=",">--> <!-- <foreach collection="companyCodes" index="index" item="companyCode" open="(" close=")" separator=",">-->
<!-- #{companyCode}--> <!-- #{companyCode}-->
<!-- </foreach>--> <!-- </foreach>-->
<if test="companyCodes != null and companyCodes != '99' and companyCodes != '88' and companyCodes != '' and companyCodes != 'null'" > <if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode == '99'">
and t.comp_code = #{companyCodes} 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>
<if test="companyCodes != null and companyCodes != '' and companyCodes == '88'"> <if test="companyCode != null and companyCode != '' and companyCode == '88'">
and (t.comp_code = '' or t.comp_code is null) and (t.comp_code = '' or t.comp_code is null)
</if> </if>
<if test="suspendStatus != null and suspendStatus != '' and suspendStatus != 'null' and suspendStatus != '99' and suspendStatus == '1'.toString()"> <if test="suspendStatus != null and suspendStatus != '' and suspendStatus != 'null' and suspendStatus != '99' and suspendStatus == '1'.toString()">
@ -408,18 +419,29 @@
c.select_end_date or d.tj_status in ('1','2')) c.select_end_date or d.tj_status in ('1','2'))
</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>
<!-- and t.comp_code in--> <!-- and t.comp_code in-->
<!-- <foreach collection="companyCodes" index="index" item="companyCode" open="(" close=")" separator=",">--> <!-- <foreach collection="companyCodes" index="index" item="companyCode" open="(" close=")" separator=",">-->
<!-- #{companyCode}--> <!-- #{companyCode}-->
<!-- </foreach>--> <!-- </foreach>-->
<if test="companyCodes != null and companyCodes != '99' and companyCodes != '88' and companyCodes != '' and companyCodes != 'null'" > <if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode == '99'">
and t.comp_code = #{companyCodes} 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>
<if test="companyCodes != null and companyCodes != '' and companyCodes == '88'"> <if test="companyCode != null and companyCode != '' and companyCode == '88'">
and (t.comp_code = '' or t.comp_code is null) and (t.comp_code = '' or t.comp_code is null)
</if> </if>
<if test="qszt != null and qszt != '' and qszt != 'null' "> <if test="qszt != null and qszt != '' and qszt != 'null' ">

@ -57,13 +57,17 @@ public class ExtInvoicePoolController extends AbstractController {
pramsMap.put("dbName", getUserInfo().getDbName()); pramsMap.put("dbName", getUserInfo().getDbName());
List<String> gfshList = new ArrayList<>(); List<String> gfshList = new ArrayList<>();
if (!"99".equals(pramsMap.get("gfsh")) && pramsMap.get("gfsh") != null && !"".equals(pramsMap.get("gfsh"))) { // if (!"99".equals(pramsMap.get("gfsh")) && pramsMap.get("gfsh") != null && !"".equals(pramsMap.get("gfsh"))) {
gfshList.add(pramsMap.get("gfsh").toString()); // gfshList.add(pramsMap.get("gfsh").toString());
} else { // } else {
gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg()); // gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
if (gfshList.size() == 0) { // if (gfshList.size() == 0) {
return ResponseEntity.ok(R.ok().put("data", "")); // return ResponseEntity.ok(R.ok().put("data", ""));
} // }
// }
gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
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"))) {
@ -207,14 +211,18 @@ public class ExtInvoicePoolController extends AbstractController {
pramsMap.put("dbName", getUserInfo().getDbName()); pramsMap.put("dbName", getUserInfo().getDbName());
List<String> gfshList = new ArrayList<>(); List<String> gfshList = new ArrayList<>();
if (!"99".equals(pramsMap.get("gfsh")) && pramsMap.get("gfsh") != null && !"".equals(pramsMap.get("gfsh"))) { // if (!"99".equals(pramsMap.get("gfsh")) && pramsMap.get("gfsh") != null && !"".equals(pramsMap.get("gfsh"))) {
gfshList.add(pramsMap.get("gfsh").toString()); // gfshList.add(pramsMap.get("gfsh").toString());
} else { // } else {
gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg()); // gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
if (gfshList.size() == 0) { // if (gfshList.size() == 0) {
// return ResponseEntity.ok(R.ok().put("data", ""));
// }
// }
gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
if (gfshList.size() == 0) {
return ResponseEntity.ok(R.ok().put("data", "")); 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())));

@ -69,10 +69,10 @@
like like
CONCAT('%',#{keyWord},'%') CONCAT('%',#{keyWord},'%')
</if> </if>
<!-- and t.gf_tax_no in--> and t.gf_tax_no in
<!-- <foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">--> <foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
<!-- #{item}--> #{item}
<!-- </foreach>--> </foreach>
<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 +218,10 @@
like like
CONCAT('%',#{keyWord},'%') CONCAT('%',#{keyWord},'%')
</if> </if>
<!-- and t.gf_tax_no in--> and t.gf_tax_no in
<!-- <foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">--> <foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
<!-- #{item}--> #{item}
<!-- </foreach>--> </foreach>
<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 +506,10 @@
like like
CONCAT('%',#{keyWord},'%') CONCAT('%',#{keyWord},'%')
</if> </if>
<!-- and t.xf_tax_no in--> and t.xf_tax_no in
<!-- <foreach collection="taxno" index="index" item="item" open="(" separator="," close=")">--> <foreach collection="taxno" index="index" item="item" open="(" separator="," close=")">
<!-- #{item}--> #{item}
<!-- </foreach>--> </foreach>
<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 +617,10 @@
like like
CONCAT('%',#{keyWord},'%') CONCAT('%',#{keyWord},'%')
</if> </if>
<!-- and t.xf_tax_no in--> and t.xf_tax_no in
<!-- <foreach collection="taxno" index="index" item="item" open="(" separator="," close=")">--> <foreach collection="taxno" index="index" item="item" open="(" separator="," close=")">
<!-- #{item}--> #{item}
<!-- </foreach>--> </foreach>
<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