Merge branches '0507' and 'release' of http://192.168.12.182/invoice/pt into release

release
yishiqihuasheng 2 years ago
commit 9b15dd1825
  1. 9
      dxhy-erp/src/main/java/com/dxhy/erp/dao/TdxPlatformCheckLogDao.java
  2. 34
      dxhy-erp/src/main/java/com/dxhy/erp/entity/TdxPlatformCheckLog.java
  3. 7
      dxhy-erp/src/main/java/com/dxhy/erp/service/TdxPlatformCheckLogService.java
  4. 11
      dxhy-erp/src/main/java/com/dxhy/erp/service/impl/TdxPlatformCheckLogServiceImpl.java
  5. 6
      dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtCustomsController.java
  6. 16
      dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtInvoicePoolController.java
  7. 7
      dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtTicketController.java
  8. 1
      dxhy-extend/src/main/java/com/dxhy/extend/entity/ExtOtherInvoice.java
  9. 1
      dxhy-extend/src/main/java/com/dxhy/extend/entity/JkszhcxRespVO.java
  10. 4
      dxhy-extend/src/main/java/com/dxhy/extend/service/companypool/TicketServiceImpl.java
  11. 5
      dxhy-extend/src/main/java/com/dxhy/extend/service/customs/CustomsServiceImpl.java
  12. 12
      dxhy-extend/src/main/java/com/dxhy/extend/service/pool/ExtInvoicePoolServiceImpl.java
  13. 49
      dxhy-extend/src/main/resources/mapper/CustomsMapper.xml
  14. 139
      dxhy-extend/src/main/resources/mapper/ExtInvoicePoolMapper.xml
  15. 44
      dxhy-extend/src/main/resources/mapper/TicketMapper.xml

@ -0,0 +1,9 @@
package com.dxhy.erp.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dxhy.erp.entity.TdxPlatformCheckLog;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface TdxPlatformCheckLogDao extends BaseMapper<TdxPlatformCheckLog> {
}

@ -0,0 +1,34 @@
package com.dxhy.erp.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
@TableName("t_dx_platform_check_log")
public class TdxPlatformCheckLog implements Serializable {
private static final long serialVersionUID = -6703830991573450761L;
//id
private Long id;
//发票代码
private String invoiceCode;
//发票号码
private String invoiceNo;
//请求参数
private String requesPrams;
//返回结果
private String returnResult;
//查验时间
private Date chaeckDate;
}

@ -0,0 +1,7 @@
package com.dxhy.erp.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dxhy.erp.entity.TdxPlatformCheckLog;
public interface TdxPlatformCheckLogService extends IService<TdxPlatformCheckLog> {
}

@ -0,0 +1,11 @@
package com.dxhy.erp.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dxhy.erp.dao.TdxPlatformCheckLogDao;
import com.dxhy.erp.entity.TdxPlatformCheckLog;
import com.dxhy.erp.service.TdxPlatformCheckLogService;
import org.springframework.stereotype.Service;
@Service
public class TdxPlatformCheckLogServiceImpl extends ServiceImpl<TdxPlatformCheckLogDao, TdxPlatformCheckLog> implements TdxPlatformCheckLogService {
}

@ -3,6 +3,7 @@ package com.dxhy.extend.controller;
import com.dxhy.common.aspect.SysLog;
import com.dxhy.common.constant.CommonConstants;
import com.dxhy.common.controller.AbstractController;
import com.dxhy.common.util.StringHelper;
import com.dxhy.common.util.UserInfoUtil;
import com.dxhy.common.utils.DateUtils;
import com.dxhy.common.utils.R;
@ -143,6 +144,11 @@ public class ExtCustomsController extends AbstractController {
pramsMap.put("postingTimeEnd",
DateUtils.getNight(DateUtils.strToDate(pramsMap.get("postingTimeEnd").toString())));
}
String companyCode = (String) pramsMap.get("companyCode");
if (StringHelper.isNotBlank(companyCode) && "99".equals(companyCode)){
pramsMap.put("companyCodes",getUserInfo().getCompanyCodes());
log.info("组织编码为====>{}",pramsMap.get("companyCodes"));
}
log.info("请求列表的参数为:{}",pramsMap);

@ -10,7 +10,9 @@ import javax.annotation.Resource;
import com.dxhy.auth.client.annotation.IgnoreClientToken;
import com.dxhy.auth.client.annotation.IgnoreUserToken;
import com.dxhy.common.util.StringHelper;
import com.dxhy.common.vo.TaxOrgCode;
import com.dxhy.common.vo.UserInfo;
import com.dxhy.extend.entity.PullRecordReq;
import org.apache.commons.lang3.StringUtils;
import org.springframework.http.ResponseEntity;
@ -97,6 +99,11 @@ public class ExtInvoicePoolController extends AbstractController {
}
int curr = (int)pramsMap.get("curr");
int size = (int)pramsMap.get("size");
String companyCode = (String) pramsMap.get("companyCode");
if (StringHelper.isNotBlank(companyCode) && "99".equals(companyCode)){
pramsMap.put("companyCodes",getUserInfo().getCompanyCodes());
log.info("组织机构====>{}",pramsMap.get("companyCodes"));
}
try {
return ResponseEntity.ok(R.ok().put("data", extInvoicePoolService.listAddTax(pramsMap, curr, size)));
} catch (Exception e) {
@ -170,6 +177,11 @@ public class ExtInvoicePoolController extends AbstractController {
pramsMap.put("accountPeriod", accountPeriod);
log.info("accountPeriod:{}",accountPeriod);
}
String companyCode = (String) pramsMap.get("companyCode");
if (StringHelper.isNotBlank(companyCode) && "99".equals(companyCode)){
pramsMap.put("companyCodes",getUserInfo().getCompanyCodes());
log.info("组织编码===>{}", pramsMap.get("companyCodes"));
}
int curr = (int)pramsMap.get("curr");
int size = (int)pramsMap.get("size");
try {
@ -231,6 +243,10 @@ public class ExtInvoicePoolController extends AbstractController {
}
int curr = (int)pramsMap.get("curr");
int size = (int)pramsMap.get("size");
String companyCode = (String) pramsMap.get("companyCode");
if (StringHelper.isNotBlank(companyCode) && "99".equals(companyCode)){
pramsMap.put("companyCodes",getUserInfo().getCompanyCodes());
}
try {
return ResponseEntity.ok(Objects
.requireNonNull(R.ok().put("data", extInvoicePoolService.listSaleInvoice(pramsMap, curr, size))));

@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.dxhy.common.aspect.SysLog;
import com.dxhy.common.constant.CommonConstants;
import com.dxhy.common.controller.AbstractController;
import com.dxhy.common.util.StringHelper;
import com.dxhy.common.util.UserInfoUtil;
import com.dxhy.common.utils.DateUtils;
import com.dxhy.common.utils.R;
@ -60,6 +61,7 @@ public class ExtTicketController extends AbstractController {
return ResponseEntity.ok(R.ok().put("data", ""));
}
}
paramsMap.put("gfsh",gfshList);
if (paramsMap.get("invoiceType") != null && !"".equals(paramsMap.get("invoiceType"))
&& !"99".equals(paramsMap.get("invoiceType"))) {
String[] invoiceTypeArr = paramsMap.get("invoiceType").toString().split(",");
@ -107,6 +109,11 @@ public class ExtTicketController extends AbstractController {
}
int curr = (int)paramsMap.get("curr");
int size = (int)paramsMap.get("size");
String companyCode = (String) paramsMap.get("companyCode");
if (StringHelper.isNotBlank(companyCode) && "99".equals(companyCode)){
paramsMap.put("companyCodes",getUserInfo().getCompanyCodes());
log.info("组织编码======>{}",paramsMap.get("companyCodes"));
}
try {
return ResponseEntity.ok(R.ok().put("data", ticketService.queryList(paramsMap, curr, size)));
} catch (Exception e) {

@ -71,4 +71,5 @@ public class ExtOtherInvoice implements Serializable {
private String inAccountStatus;
private String bzdh;
private String snVoucherNumber;
private String compCode;
}

@ -195,4 +195,5 @@ public class JkszhcxRespVO {
private String entryUser;
private String filePath;
private String businessName;
private String compCode;
}

@ -45,12 +45,12 @@ public class TicketServiceImpl extends MpBaseServiceImpl<ExtTicketDao, ExtTicket
try {
String[] titlelist = {"序号", "发票类型", "发票代码", "发票号码", "开票日期", "销方名称", "乘坐人", "证件号", "班次/车次", "金额",
"签收状态", "签收日期", "签收方式", "签收人", "抵扣状态", "业务单号", "入池时间","凭证号", "过账时间", "影像号",
"账期","报账单号","入账状态"};
"账期","报账单号","入账状态","所属组织"};
String[] titleprop = {"xh", "invoiceTypeString", "invoiceCode", "invoiceNo", "invoiceDate", "xfName",
"passenger", "passengerSfzh", "trainNumber", "invoiceAmount", "qsStatus",
"qsDate", "qsType", "qsName", "isDeduction", "businessDocumentNumber", "createDate","snVoucherNumber",
"postingTime","imageId","accountPeriod","bzdh","inAccountStatus"};
"postingTime","imageId","accountPeriod","bzdh","inAccountStatus","compCode"};
// 需要设置返回列表标题时调用
json = super.setTitleList(titlelist, titleprop);
PageHelper.startPage(curr, size);

@ -44,11 +44,12 @@ public class CustomsServiceImpl extends MpBaseServiceImpl<CustomsDao, CustomsRec
// 表头
String[] titlelist = {"序号", "缴款书号码", "管理状态", "填发日期", "缴款单位名称", "缴款单位税号", "税款金额", "抵扣税款金额", "稽核结果", "是否申请核对",
"核对结果", "认证状态", "认证类型", "认证日期", "认证方式", "认证人", "采集状态", "底账库采集时间", "采集来源", "签收方式", "签收状态", "签收日期", "签收人",
"入账月份", "入账状态", "凭证号", "业务单元", "入池时间", "过账时间", "影像号", "账期"};
"入账月份", "入账状态", "凭证号", "业务单元", "入池时间", "过账时间", "影像号", "账期","所属组织"};
String[] titleprop = {"xh", "customsCode", "glzt", "fillInDate", "gfName", "gfTaxNo", "taxAmount",
"yxTaxAmount", "auditStatus", "applyCheck", "checkStatus", "rzhYesorno", "bdkStatus", "rzhDate", "rzhType",
"confirmUser", "cjzt", "createDate", "dataSources", "qsType", "qsStatus", "qsDate", "qsUser",
"inAccountDate", "inAccountStatus", "voucherNumber", "businessName", "createDate", "postingTime","imageId","accountPeriod"};
"inAccountDate", "inAccountStatus", "voucherNumber", "businessName", "createDate", "postingTime","imageId",
"accountPeriod","compCode"};
// 需要设置返回列表标题时调用
JSONObject json = super.setTitleList(titlelist, titleprop);
try {

@ -49,13 +49,13 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl<ExtInvoicePoolD
try {
String[] titlelist = {"序号", "发票类型", "发票代码", "发票号码", "发票状态", "开票日期", "销方名称", "销方税号", "金额", "税额", "有效税额",
"价税合计", "认证状态", "认证类型", "认证日期", "认证方式", "认证人", "采集状态", "底账库采集时间", "采集来源", "签收方式", "签收状态", "签收日期", "签收人",
"入账月份", "凭证号", "过账时间", "影像号", "账期","是否末次摊销", "摊销金额", "剩余金额", "业务单号", "入池时间","报账单号","入账状态"};
"入账月份", "凭证号", "过账时间", "影像号", "账期","是否末次摊销", "摊销金额", "剩余金额", "业务单号", "入池时间","报账单号","入账状态","所属组织"};
String[] titleprop = {"xh", "invoiceType", "invoiceCode", "invoiceNo", "invoiceStatus", "invoiceDate",
"xfmc", "xfsh", "invoiceAmount", "taxAmount", "yxse", "totalAmount", "rzzt", "rzlx", "rzrq", "rzfs",
"rzr", "collectStatus", "collectDate", "collectFrom", "qsfs", "qszt", "qsrq", "qsr", "inAccountMonth",
"snVoucherNumber","postingTime","imageNumber","accountPeriod", "amortizeStatus", "amortizeAmount", "remainAmortizeAmount",
"documentNumber", "createDate","bzdh","inAccountStatus"};
"documentNumber", "createDate","bzdh","inAccountStatus","compCode"};
// 需要设置返回列表标题时调用
json = super.setTitleList(titlelist, titleprop);
PageHelper.startPage(curr, size);
@ -217,10 +217,10 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl<ExtInvoicePoolD
try {
String[] titlelist =
{"序号", "发票类型", "发票代码", "发票号码", "开票日期", "金额", "签收状态", "签收日期", "签收方式", "签收人", "业务单号"
, "入池时间","凭证号", "过账时间", "影像号", "账期","报账单号","入账状态"};
, "入池时间","凭证号", "过账时间", "影像号", "账期","报账单号","入账状态","所属组织"};
String[] titleprop = {"xh", "invoiceTypeString", "invoiceCode", "invoiceNo", "invoiceDate", "invoiceAmount",
"qszt", "qsrq", "qsfs", "qsr", "businessDocumentNumber", "createDate","snVoucherNumber", "postingTime",
"imageNumber","accountPeriod","bzdh","inAccountStatus"};
"imageNumber","accountPeriod","bzdh","inAccountStatus","compCode"};
// 需要设置返回列表标题时调用
json = super.setTitleList(titlelist, titleprop);
PageHelper.startPage(curr, size);
@ -310,13 +310,13 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl<ExtInvoicePoolD
try {
String[] titlelist = {"序号", "发票类型", "发票代码", "发票号码", "发票状态", "开票日期", "购方名称", "购方税号", "金额", "税额", "价税合计",
"清单标志", "备注", "优惠政策类型", "采集状态", "采集时间", "采集来源", "签收方式", "对接系统", "签收状态", "签收日期", "签收人", "入账月份",
"凭证号", "业务单号", "入池时间","影像号","账期","过账日期","报账单号","入账状态"};
"凭证号", "业务单号", "入池时间","影像号","账期","过账日期","报账单号","入账状态","所属组织"};
String[] titleprop = {"xh", "invoiceType", "invoiceCode", "invoiceNo", "invoiceStatus", "invoiceDate",
"gfmc", "gfsh", "invoiceAmount", "taxAmount", "totalAmount", "listStatus", "remark", "incentiveFlag",
"collectStatus", "collectDate", "collectFrom", "qsfs", "systemName", "qszt", "qsrq", "qsr",
"inAccountMonth", "snVoucherNumber", "documentNumber", "createDate","imageNumber","accountPeriod"
,"postingTime","bzdh","inAccountStatus"};
,"postingTime","bzdh","inAccountStatus","compCode"};
// 需要设置返回列表标题时调用
json = super.setTitleList(titlelist, titleprop);
PageHelper.startPage(curr, size);

@ -5,6 +5,7 @@
<resultMap id="BaseResultMap"
type="com.dxhy.extend.entity.JkszhcxRespVO">
<result column="customs_code" property="customsCode"/>
<result column="comp_code" property="compCode"/>
<result column="fill_in_date" property="fillInDate"/>
<result column="gf_tax_no" property="gfTaxNo"/>
<result column="gf_name" property="gfName"/>
@ -49,12 +50,13 @@
DATE_FORMAT(t.qs_date,'%Y-%m-%d') qs_date,t.qs_type,t.qs_user,DATE_FORMAT(t.rzh_date,'%Y-%m-%d')
rzh_date, t.rzh_yesorno,t.auth_status,t.bdk_status,t.confirm_user,t.rzh_belong_date,t.glzt,
t.customs_scan_id,t.dept_name businessName,t.in_account_status,t.voucher_number,t.document_number,t.in_account_date,rzh_type,rzlx,t.create_date,
data_sources,t.image_id,t.posting_time,t.account_period
data_sources,t.image_id,t.posting_time,t.account_period,t.comp_code
from t_dx_customs_record t
where export_mark = '0' and t.gf_tax_no in
<foreach close=")" collection="gfsh" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
where export_mark = '0'
<!-- and t.gf_tax_no in-->
<!-- <foreach close=")" collection="gfsh" index="index" item="item" open="(" separator=",">-->
<!-- #{item}-->
<!-- </foreach>-->
<if test="keyWord != null and keyWord != '' and keyWord != 'null'">
and t.customs_code like CONCAT('%',#{keyWord},'%')
</if>
@ -146,6 +148,20 @@
<if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</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 != '' and companyCode != 'null' and companyCode != '99' and companyCode != '88'">
and t.comp_code = #{companyCode}
</if>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != '99' and companyCode == '88'">
and (t.comp_code = '' or t.comp_code is null)
</if>
order by t.fill_in_date desc
</select>
@ -155,10 +171,11 @@
count(1) hjsl,
sum(t.tax_amount) hjse
from t_dx_customs_record t
where export_mark = '0' and t.gf_tax_no in
<foreach close=")" collection="gfsh" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
where export_mark = '0'
<!-- and t.gf_tax_no in-->
<!-- <foreach close=")" collection="gfsh" index="index" item="item" open="(" separator=",">-->
<!-- #{item}-->
<!-- </foreach>-->
<if test="keyWord != null and keyWord != '' and keyWord != 'null'">
and t.customs_code like CONCAT('%',#{keyWord},'%')
</if>
@ -250,6 +267,20 @@
<if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</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 != '' and companyCode != 'null' and companyCode != '99' and companyCode != '88'">
and t.comp_code = #{companyCode}
</if>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != '99' and companyCode == '88'">
and (t.comp_code = '' or t.comp_code is null)
</if>
</select>

@ -69,10 +69,10 @@
like
CONCAT('%',#{keyWord},'%')
</if>
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<!-- and t.gf_tax_no in-->
<!-- <foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">-->
<!-- #{item}-->
<!-- </foreach>-->
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' ">
and t.invoice_type = #{invoiceType}
</if>
@ -130,6 +130,20 @@
<if test="invoiceSource!=null and invoiceSource!='' and invoiceSource!='99'">
and t.invoice_source = #{invoiceSource}
</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 != '' and companyCode != 'null' and companyCode != '99' and companyCode != '88'">
and t.comp_code = #{companyCode}
</if>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != '99' and companyCode == '88'">
and (t.comp_code = '' or t.comp_code is null)
</if>
and t.invoice_type not in ('91','95','97','99','101','00')
</select>
<select id="listAddTaxInvoice" parameterType="java.util.Map"
@ -179,7 +193,8 @@
t.bzdh bzdh,
t.posting_time postingTime,
DATE_FORMAT(t.collect_date,'%Y-%m-%d') collectDate,
t.collect_from collectFrom
t.collect_from collectFrom,
t.comp_code compCode
from t_dx_record_invoice t
where 1 = 1
<if test="cjksyf != null and cjksyf!= '' and cjjsyf != null and cjjsyf != ''">
@ -193,10 +208,10 @@
like
CONCAT('%',#{keyWord},'%')
</if>
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<!-- and t.gf_tax_no in-->
<!-- <foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">-->
<!-- #{item}-->
<!-- </foreach>-->
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' ">
and t.invoice_type = #{invoiceType}
</if>
@ -257,6 +272,20 @@
<!-- <if test="snVoucherNumber !=null and snVoucherNumber !='' and snVoucherNumber !='99'">-->
<!-- and t.sn_voucher_number = #{snVoucherNumber}-->
<!-- </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 != '' and companyCode != 'null' and companyCode != '99' and companyCode != '88'">
and t.comp_code = #{companyCode}
</if>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != '99' and companyCode == '88'">
and (t.comp_code = '' or t.comp_code is null)
</if>
and t.invoice_type not in ('91','95','97','99','101','00')
</select>
<!--其他发票汇总-->
@ -279,10 +308,10 @@
<if test="keyWord != null and keyWord != '' and keyWord != 'null' ">
AND CONCAT(IFNULL(invoice_code,''),IFNULL(invoice_no,'')) like CONCAT('%',#{keyWord},'%')
</if>
AND gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<!-- AND gf_tax_no in-->
<!-- <foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">-->
<!-- #{item}-->
<!-- </foreach>-->
<if
test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '999' ">
AND invoice_type = #{invoiceType}
@ -317,6 +346,20 @@
<if test="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and sn_voucher_number = #{snVoucherNumber}
</if>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode == '99'">
and (comp_code in
<foreach collection="companyCodes" index="index" item="companyCode" separator="," open="(" close=")">
#{companyCode}
</foreach>
or comp_code is null or comp_code = ''
)
</if>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != '99' and companyCode != '88'">
and comp_code = #{companyCode}
</if>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != '99' and companyCode == '88'">
and (comp_code is null or comp_code = '')
</if>
GROUP BY uuid having min(create_date) ) t
</select>
<select id="listOtherInvoice" parameterType="java.util.Map"
@ -341,7 +384,8 @@
posting_time postingTime,
inaccount_status inAccountStatus,
bzdh bzdh,
sn_voucher_number snVoucherNumber
sn_voucher_number snVoucherNumber,
comp_code compCode
FROM
t_dx_invoice_reimburse
where invoice_type in
@ -349,10 +393,10 @@
<if test="cjksyf != null and cjksyf!= '' and cjjsyf != null and cjjsyf != ''">
AND create_date between #{cjksyf} and #{cjjsyf}
</if>
AND gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<!-- AND gf_tax_no in-->
<!-- <foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">-->
<!-- #{item}-->
<!-- </foreach>-->
<if test="kpksrq != null and kpksrq!= '' and kpjsrq != null and kpjsrq != ''">
AND invoice_date between #{kpksrq} and #{kpjsrq}
</if>
@ -396,6 +440,20 @@
<if test="bzdh != null and bzdh != '' and bzdh != 'null' and badh != '99'">
and bzdh = #{bzdh}
</if>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode == '99'">
and (comp_code in
<foreach collection="companyCodes" index="index" item="companyCode" separator="," open="(" close=")">
#{companyCode}
</foreach>
or comp_code is null or comp_code = ''
)
</if>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != '99' and companyCode != '88'">
and comp_code = #{companyCode}
</if>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != '99' and companyCode == '88'">
and (comp_code is null or comp_code = '')
</if>
GROUP BY uuid having min(create_date)
ORDER BY create_date DESC
</select>
@ -416,10 +474,10 @@
like
CONCAT('%',#{keyWord},'%')
</if>
and t.xf_tax_no in
<foreach collection="taxno" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<!-- and t.xf_tax_no in-->
<!-- <foreach collection="taxno" index="index" item="item" open="(" separator="," close=")">-->
<!-- #{item}-->
<!-- </foreach>-->
<if
test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' ">
and t.invoice_type = #{invoiceType}
@ -481,6 +539,20 @@
<if test="bzdh != null and bzdh != '' and bzdh != 'null' and badh != '99'">
and t.bzdh = #{bzdh}
</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 != '' and companyCode != 'null' and companyCode != '99' and companyCode != '88'">
and t.comp_code = #{companyCode}
</if>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != '99' and companyCode == '88'">
and (t.comp_code = '' or t.comp_code is null)
</if>
</select>
<!--销项票池查询-->
<select id="listSaleInvoice" parameterType="java.util.Map"
@ -495,6 +567,7 @@
,t.posting_time postingTime
,t.inaccount_status inAccountStatus
,t.bzdh bzdh
,t.comp_code compCode
from t_dx_sale_record_invoice t
where 1 = 1
<if test="cjksyf != null and cjksyf!= '' and cjjsyf != null and cjjsyf != ''">
@ -508,10 +581,10 @@
like
CONCAT('%',#{keyWord},'%')
</if>
and t.xf_tax_no in
<foreach collection="taxno" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<!-- and t.xf_tax_no in-->
<!-- <foreach collection="taxno" index="index" item="item" open="(" separator="," close=")">-->
<!-- #{item}-->
<!-- </foreach>-->
<if
test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' ">
and t.invoice_type = #{invoiceType}
@ -575,6 +648,20 @@
<if test="bzdh != null and bzdh != '' and bzdh != 'null' and badh != '99'">
and t.bzdh = #{bzdh}
</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 != '' and companyCode != 'null' and companyCode != '99' and companyCode != '88'">
and t.comp_code = #{companyCode}
</if>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != '99' and companyCode == '88'">
and (t.comp_code = '' or t.comp_code is null)
</if>
GROUP BY t.uuid
ORDER BY t.create_date DESC
</select>

@ -26,10 +26,10 @@
and CONCAT(IFNULL(t.passenger,''),IFNULL(t.passenger_s_f_z_h,'')) like
CONCAT('%',#{keyWord},'%')
</if>
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<!-- and t.gf_tax_no in-->
<!-- <foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">-->
<!-- #{item}-->
<!-- </foreach>-->
<if test="list != null and list != '' and list != 'null' ">
and t.invoice_type in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
@ -72,6 +72,20 @@
<if test="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and t.sn_voucher_number = #{snVoucherNumber}
</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 != '' and companyCode != 'null' and companyCode != '99' and companyCode != '88'">
and t.comp_code = #{companyCode}
</if>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != '99' and companyCode == '88'">
and (t.comp_code is null or t.comp_code = '')
</if>
</select>
@ -90,10 +104,10 @@
and CONCAT(IFNULL(t.passenger,''),IFNULL(t.passenger_s_f_z_h,'')) like
CONCAT('%',#{keyWord},'%')
</if>
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<!-- and t.gf_tax_no in-->
<!-- <foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">-->
<!-- #{item}-->
<!-- </foreach>-->
<if test="list != null and list != '' and list != 'null' ">
and t.invoice_type in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
@ -136,5 +150,19 @@
<if test="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and t.sn_voucher_number = #{snVoucherNumber}
</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 != '' and companyCode != 'null' and companyCode != '99' and companyCode != '88'">
and t.comp_code = #{companyCode}
</if>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != '99' and companyCode == '88'">
and (t.comp_code is null or t.comp_code = '')
</if>
</select>
</mapper>

Loading…
Cancel
Save