购方税号和组织编码修改

release
yishiqihuasheng 2 years ago
parent 3a11c26358
commit 11c36872fa
  1. 69
      dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java
  2. 6
      dxhy-base/src/main/java/com/dxhy/base/service/invoicecheck/BaseInvoiceManualCheckServiceImpl.java
  3. 52
      dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml

@ -506,17 +506,18 @@ public class BaseInvoiceController extends AbstractController {
@SysLog("调用手工勾选查询接口")
@ResponseBody
public Object sggxcx(@RequestBody Map<String, Object> map) {
// List<TaxOrgCode> orgCodes = getUserInfo().getOrgCodes();
// log.info("user信息========>{}",getUserInfo());
// if (orgCodes != null && orgCodes.size() > 0){
// for (int i = 0; i < orgCodes.size(); i++) {
// log.info("orgcode=======>{}",orgCodes.get(i));
// }
// }else {
// log.info("未能获得机构代码");
// }
String gfsh = (String)map.get("gfsh");
if(map.get("gfsh") == null || "".equals(map.get("gfsh"))){
return ResponseEntity.ok(R.error("购方税号不能为空"));
}
if (map.get("companyCode") == null || "".equals(map.get("companyCode"))){
return ResponseEntity.ok(R.error("组织编码不能为空"));
}
String gfsh = (String) map.get("gfsh");
String companyCode = (String) map.get("companyCode");
String invoiceType = (String)map.get("invoiceType");
String invoiceSource = (String)map.get("invoiceSource");
String kpksrq = (String)map.get("kpksrq");
@ -541,7 +542,6 @@ public class BaseInvoiceController extends AbstractController {
String menuId = (String)map.get("menuId");
String bzdh = (String) map.get("bzdh");
String inAccountStatus = (String) map.get("inAccountStatus");
String companyCode = (String) map.get("companyCode");
String suspendStatus = (String) map.get("suspendStastus");
String suspendDate = (String) map.get("suspendDate");
String bzr = (String) map.get("bzr");
@ -550,22 +550,13 @@ public class BaseInvoiceController extends AbstractController {
suspendDate = suspendDate.substring(0,7);
}
// //所属机构列表
// List<String> orgCodes = null;
// if (map.get("orgCodes") !=null){
// orgCodes = (List<String>) map.get("orgCodes");
// }else {
// List<TaxOrgCode> taxOrgCodes = getUserInfo().getOrgCodes();
// if (taxOrgCodes != null && taxOrgCodes.size() > 0){
// for (TaxOrgCode taxOrgCode : taxOrgCodes) {
// orgCodes.add(taxOrgCode.getOrgCode());
// }
// }
// }
Map<String, Object> pramsMap = new HashMap<>(32);
// pramsMap.put("orgCodes",orgCodes);
pramsMap.put("companyCode",companyCode);
pramsMap.put("gfsh", gfsh);
pramsMap.put("bzdh", bzdh);
pramsMap.put("inAccountStatus", inAccountStatus);
pramsMap.put("company", company);
@ -606,8 +597,6 @@ public class BaseInvoiceController extends AbstractController {
pramsMap.put("accountPeriod", accountPeriod);
log.info("accountPeriod:{}",accountPeriod);
}
// pramsMap.put("accountPeriod", map.get("accountPeriod"));
// String inAccountStatus = (String)map.get("inAccountStatus");
if (sfkrz != null) {
if (!"99".equals(sfkrz)) {
@ -629,34 +618,6 @@ public class BaseInvoiceController extends AbstractController {
pramsMap.put("taxRate",taxRate);
}
//所属组织
// List<String> companyCodeList = new ArrayList<>();
// if (StringUtils.isNotBlank(companyCode) && !"99".equals(companyCode)){
// companyCodeList.add(companyCode);
// }else {
// companyCodeList = getUserInfo().getCompanyCodes();
// log.info("获取到的组织信息{}",companyCodeList);
// }
List<String> companyCodes = getUserInfo().getCompanyCodes();
if (StringHelper.isNotBlank(companyCode) && "99".equals(companyCode)){
pramsMap.put("companyCodes",companyCodes);
log.info("组织机构====>{}",pramsMap.get("companyCodes"));
}
if (StringUtils.isNotBlank(companyCode)){
pramsMap.put("companyCode",companyCode);
}
List<String> gfshList = new ArrayList<>();
if (!"99".equals(gfsh) && StringUtils.isNotBlank(gfsh)) {
gfshList.add(gfsh);
log.info("手工认证有税号");
} else {
gfshList = getGfshList(gfshList,companyCodes);
log.info("手工认证无税号{}",gfshList);
}
pramsMap.put("gfsh", gfshList);
if (!StringUtils.isBlank(invoiceType)) {
if (!"99".equals(invoiceType)) {

@ -74,11 +74,11 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl<BaseTDx
json = tabulateRedisService.getTabulateMenu(company, menuId);
List<BaseSggxCxRespVO> voList = new ArrayList<>();
List<String> gfshList = (List<String>) pramsMap.get("gfsh");
log.info("购方税号{}", gfshList);
String gfsh = (String) pramsMap.get("gfsh");
String qsflag = (String) pramsMap.get("qsflag");
List<String> gfshList1 = new ArrayList<>();
if (gfshList.size() > 0) {
if (StringUtils.isNotBlank(gfsh)) {
List<BaseTDxDkCount> curList = super.baseMapper.selectDksh(pramsMap);
for (BaseTDxDkCount cur : curList) {
String skssq = cur.getSkssq();

@ -76,6 +76,8 @@
and t.export_mark = '0'
and t.inaccount_status = '1'
and t.company = #{company}
and t.gf_tax_no = #{gfsh}
and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null)
<if test="sfkrz != '99' and sfkrz != null and sfkrz != '' and sfkrz != 'null' and sfkrz == '1'.toString()">
and t.invoice_status in ('0','7')
and t.invoice_amount>0
@ -97,30 +99,7 @@
<if test=" bzdh == ''">
and t.bzdh is not null
</if>
<if test="sign !='88'">
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<!-- and t.comp_code in-->
<!-- <foreach collection="companyCodes" index="index" item="companyCode" open="(" close=")" separator=",">-->
<!-- #{companyCode}-->
<!-- </foreach>-->
<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>
</if>
<!--or t.comp_code is null or t.comp_code = ''-->
<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)
</if>
<if test="suspendStatus != null and suspendStatus != '' and suspendStatus != 'null' and suspendStatus != '99' and suspendStatus == '1'.toString()">
and t.suspend_status = '1'
</if>
@ -428,9 +407,8 @@
and t.inaccount_status = '1'
and t.export_mark = '0'
and t.company = #{company}
<!-- <if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != 99" >-->
<!-- t.comp_code = #{companyCode}-->
<!-- </if>-->
and t.gf_tax_no = #{gfsh}
and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null)
<if test="sfkrz != '99' and sfkrz != null and sfkrz != '' and sfkrz != 'null' and sfkrz == '1'.toString()">
and t.invoice_status in ('0','7')
and t.invoice_amount>0
@ -446,29 +424,7 @@
c.select_end_date or d.tj_status in ('1','2'))
</if>
<if test="sign !='88'">
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<!-- and t.comp_code in-->
<!-- <foreach collection="companyCodes" index="index" item="companyCode" open="(" close=")" separator=",">-->
<!-- #{companyCode}-->
<!-- </foreach>-->
<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>
</if>
<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)
</if>
<if test="qszt != null and qszt != '' and qszt != 'null' ">
and t.qs_status = #{qszt}
</if>

Loading…
Cancel
Save