Merge branch '0725export' into release

release
WangQi 2 years ago
commit b69db89aa1
  1. 6
      dxhy-core/src/main/java/com/dxhy/core/service/export/impl/FpzhcxmxServiceImpl.java
  2. 7
      dxhy-core/src/main/java/com/dxhy/core/service/export/impl/FpzhcxslServiceImpl.java
  3. 33
      dxhy-core/src/main/java/com/dxhy/core/thread/FpzhcxmxExportThread.java
  4. 44
      dxhy-core/src/main/java/com/dxhy/core/thread/FpzhcxslExportThread.java
  5. 120
      dxhy-core/src/main/resources/mapper/BbfpzhmxMapper.xml
  6. 121
      dxhy-core/src/main/resources/mapper/BbfpzhslMapper.xml

@ -84,7 +84,11 @@ public class FpzhcxmxServiceImpl extends MpBaseServiceImpl<BbfpzhmxDao, Bbfpzhmx
for (int j = 0; j < pageList.size(); j++) {
String[] dataArray = new String[30];
dataArray[0] = String.valueOf((curr - 1) * size + j + 1);
dataArray[1] = dictdetaServcice.queryDictName(DictConstant.DK_STATUS,pageList.get(j).getInAccountStatus());
if (pageList.get(j).getInAccountStatus() != null && "1".equals(pageList.get(j).getInAccountStatus())){
dataArray[1] = "已入账";
}else {
dataArray[1] = "未入账";
}
dataArray[2] = pageList.get(j).getInvoiceCode();
dataArray[3] = pageList.get(j).getInvoiceNo();
// 发票类型

@ -71,7 +71,12 @@ public class FpzhcxslServiceImpl extends MpBaseServiceImpl<BbfpzhslDao, Bbfpzhsl
for (int i = 0; i < pageList.size(); i++) {
String[] dataArray = new String[8];
dataArray[0] = String.valueOf((curr - 1) * size + i + 1);
dataArray[1] = dictdetaServcice.queryDictName(DictConstant.DK_STATUS,pageList.get(i).getInAccountStatus());
if ("1".equals(pageList.get(i).getInAccountStatus())){
dataArray[1] = "已入账";
}else {
dataArray[1] = "未入账";
}
// dataArray[1] = dictdetaServcice.queryDictName(DictConstant.DK_STATUS,pageList.get(i).getInAccountStatus());
dataArray[2] = pageList.get(i).getInvoiceCode();
dataArray[3] = pageList.get(i).getInvoiceNo();
// 发票类型

@ -1,6 +1,7 @@
package com.dxhy.core.thread;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.dxhy.common.service.impl.TabulateRedisServiceImpl;
import com.dxhy.common.util.ExcelPoiUtil;
@ -109,6 +110,7 @@ public class FpzhcxmxExportThread extends BaseThread {
try {
exportLogService.updateStart(id, dbName);
// 应该保存的参数
// 应该保存的参数
JSONObject prams = JSONObject.parseObject(condition);
String gfsh = prams.getString("gfsh");
@ -132,12 +134,35 @@ public class FpzhcxmxExportThread extends BaseThread {
String glzt = prams.getString("glzt");
String rzlx = prams.getString("rzlx");
String company = prams.getString("company");
String menuId = prams.getString("menuId");
String bzr = prams.getString("bzr");
List<Business> businesses = (List<Business>)prams.get("userBusiness");
String bzdh = prams.getString("bzdh");
String imageNumber = prams.getString("imageNumber");
String inAccountStatus = prams.getString("inAccountStatus");
String snVoucherNumber =prams.getString("snVoucherNumber");
String companyCode = prams.getString("companyCode");
JSONArray companyCodeArray = prams.getJSONArray("companyCodes");
List<String> companyCodes = companyCodeArray.toJavaList(String.class);
String accountPeriod = prams.getString("accountPeriod");
if (org.apache.commons.lang3.StringUtils.isNotEmpty(accountPeriod) && accountPeriod.length() > 7){
accountPeriod = accountPeriod.substring(0,7);
}
String postingTimeEnd = prams.getString("postingTimeEnd");
String postingTimeStart = prams.getString("postingTimeStart");
// 参数转换为需要的形式
Map<String, Object> pramsMap = new HashMap<>(31);
pramsMap.put("dbName", dbName);
pramsMap.put("business", businesses);
pramsMap.put("bzr",bzr);
pramsMap.put("bzdh",bzdh);
pramsMap.put("imageNumber",imageNumber);
pramsMap.put("inAccountStatus",inAccountStatus);
pramsMap.put("snVoucherNumber",snVoucherNumber);
pramsMap.put("postingTimeEnd",postingTimeEnd);
pramsMap.put("postingTimeStart",postingTimeStart);
pramsMap.put("accountPeriod",accountPeriod);
List<String> gfshList = new ArrayList<>();
if (!StringHelper.isBlank(gfsh)) {
gfshList = StringHelper.stringToList(gfsh);
@ -197,10 +222,9 @@ public class FpzhcxmxExportThread extends BaseThread {
if (!StringHelper.isBlank(qsjsrq)) {
pramsMap.put("qsjsrq", DateUtils.getNight(DateUtils.strToDate(qsjsrq)));
}
if (!"99".equals(prams.getString("businessCode"))) {
pramsMap.put("businessCode", prams.getString("businessCode"));
}
}
pramsMap.put("kpksrq", DateUtils.getMorning(DateUtils.strToDate(kpksrq)));
pramsMap.put("kpjsrq", DateUtils.getNight(DateUtils.strToDate(kpjsrq)));
pramsMap.put("invoiceNo", invoiceNo);
@ -212,14 +236,17 @@ public class FpzhcxmxExportThread extends BaseThread {
pramsMap.put("amountMax", prams.getString("amountMax"));
pramsMap.put("taxAmountMin", prams.getString("taxAmountMin"));
pramsMap.put("taxAmountMax", prams.getString("taxAmountMax"));
pramsMap.put("settlementNo", prams.getString("settlementNo"));
pramsMap.put("voucherNumber", prams.getString("voucherNumber"));
pramsMap.put("companyCodes",companyCodes);
pramsMap.put("companyCode",companyCode);
if (!StringHelper.isBlank(rzlx) && !"99".equals(rzlx)) {
pramsMap.put("rzlx", rzlx);
}
pramsMap.put("company", company);
if (StringUtils.isNotBlank(inAccountStatus)) {
pramsMap.put("inAccountStatus", inAccountStatus);
titleColumns = new String[] {"序号", "打款状态", "发票代码", "发票号码", "发票类型", "开票日期", "购方税号", "购方名称", "购方地址电话",
titleColumns = new String[] {"序号", "入账状态", "发票代码", "发票号码", "发票类型", "开票日期", "购方税号", "购方名称", "购方地址电话",
"购方开户行及账号", "销方税号", "销方名称", "销方地址电话", "销方开户行及账号", "发票金额", "发票税额", "发票价税合计", "货物或应税劳务、服务名称",
"规格型号", "单位", "数量", "单价", "发票明细金额", "发票明细税额", "税率", "车牌号", "类型", "通行日期起", "通行日期止", "备注"};
}

@ -1,6 +1,7 @@
package com.dxhy.core.thread;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.dxhy.common.service.impl.TabulateRedisServiceImpl;
import com.dxhy.common.util.ExcelPoiUtil;
@ -129,12 +130,35 @@ public class FpzhcxslExportThread extends BaseThread {
String glzt = prams.getString("glzt");
String rzlx = prams.getString("rzlx");
String company = prams.getString("company");
String menuId = prams.getString("menuId");
String bzr = prams.getString("bzr");
List<Business> businesses = (List<Business>)prams.get("userBusiness");
String bzdh = prams.getString("bzdh");
String imageNumber = prams.getString("imageNumber");
String inAccountStatus = prams.getString("inAccountStatus");
String snVoucherNumber =prams.getString("snVoucherNumber");
String companyCode = prams.getString("companyCode");
JSONArray companyCodeArray = prams.getJSONArray("companyCodes");
List<String> companyCodes = companyCodeArray.toJavaList(String.class);
String accountPeriod = prams.getString("accountPeriod");
if (org.apache.commons.lang3.StringUtils.isNotEmpty(accountPeriod) && accountPeriod.length() > 7){
accountPeriod = accountPeriod.substring(0,7);
}
String postingTimeEnd = prams.getString("postingTimeEnd");
String postingTimeStart = prams.getString("postingTimeStart");
// 参数转换为需要的形式
Map<String, Object> pramsMap = new HashMap<>(31);
pramsMap.put("dbName", dbName);
pramsMap.put("business", businesses);
pramsMap.put("bzr",bzr);
pramsMap.put("bzdh",bzdh);
pramsMap.put("imageNumber",imageNumber);
pramsMap.put("inAccountStatus",inAccountStatus);
pramsMap.put("snVoucherNumber",snVoucherNumber);
pramsMap.put("postingTimeEnd",postingTimeEnd);
pramsMap.put("postingTimeStart",postingTimeStart);
pramsMap.put("accountPeriod",accountPeriod);
List<String> gfshList = new ArrayList<>();
if (!StringHelper.isBlank(gfsh)) {
gfshList = StringHelper.stringToList(gfsh);
@ -167,6 +191,11 @@ public class FpzhcxslExportThread extends BaseThread {
pramsMap.put("invoiceStatus", invoiceStatus);
}
}
if (!StringHelper.isBlank(glzt)) {
if (!"99".equals(glzt)) {
pramsMap.put("glzt", glzt);
}
}
if ("1".equals(rzzt) || "2".equals(rzzt) || "3".equals(rzzt)) {
if (!StringHelper.isBlank(skssq)) {
pramsMap.put("skssq", skssq.replace("-", ""));
@ -183,16 +212,15 @@ public class FpzhcxslExportThread extends BaseThread {
if (!"99".equals(qsfs)) {
pramsMap.put("qsfs", qsfs);
}
if (!StringHelper.isBlank(qsjsrq)) {
if (!StringHelper.isBlank(qsksrq)) {
pramsMap.put("qsksrq", DateUtils.getMorning(DateUtils.strToDate(qsksrq)));
}
if (!StringHelper.isBlank(qsjsrq)) {
pramsMap.put("qsjsrq", DateUtils.getNight(DateUtils.strToDate(qsjsrq)));
}
if (!"99".equals(prams.getString("businessCode"))) {
pramsMap.put("businessCode", prams.getString("businessCode"));
}
}
pramsMap.put("kpksrq", DateUtils.getMorning(DateUtils.strToDate(kpksrq)));
pramsMap.put("kpjsrq", DateUtils.getNight(DateUtils.strToDate(kpjsrq)));
pramsMap.put("invoiceNo", invoiceNo);
@ -204,19 +232,17 @@ public class FpzhcxslExportThread extends BaseThread {
pramsMap.put("amountMax", prams.getString("amountMax"));
pramsMap.put("taxAmountMin", prams.getString("taxAmountMin"));
pramsMap.put("taxAmountMax", prams.getString("taxAmountMax"));
pramsMap.put("settlementNo", prams.getString("settlementNo"));
pramsMap.put("voucherNumber", prams.getString("voucherNumber"));
pramsMap.put("companyCodes",companyCodes);
pramsMap.put("companyCode",companyCode);
if (!StringHelper.isBlank(rzlx) && !"99".equals(rzlx)) {
pramsMap.put("rzlx", rzlx);
}
if (!StringHelper.isBlank(glzt)) {
if (!"99".equals(glzt)) {
pramsMap.put("glzt", glzt);
}
}
pramsMap.put("company", company);
if (StringUtils.isNotBlank(inAccountStatus)) {
pramsMap.put("inAccountStatus", inAccountStatus);
titleColumns = new String[] {"序号", "打款状态", "发票代码", "发票号码", "发票类型", "金额", "税额", "税率"};
titleColumns = new String[] {"序号", "入账状态", "发票代码", "发票号码", "发票类型", "金额", "税额", "税率"};
}
// 导出文件名
StringBuilder ftpFileName = new StringBuilder();

@ -30,7 +30,7 @@
<result column="sl" property="sl"/>
<result column="bz" property="bz"/>
<result column="uuid" property="uuid"/>
<result column="in_account_status" property="inAccountStatus"/>
<result column="inaccount_status" property="inAccountStatus"/>
<result column="cph" property="cph"/>
<result column="lx" property="lx"/>
<result column="txrqq" property="txrqq"/>
@ -47,39 +47,55 @@
xfkhhzh,t.tax_amount,t.invoice_amount,t.rzh_belong_date skssq,
t.total_amount jshj,t.remark bz,t.uuid,b.goods_name hlmc,b.model ggxh,b.unit dw,b.num num,b.unit_price
dj,b.detail_amount je,b.tax_amount se,b.tax_rate sl,
t.in_account_status,b.cph,b.lx,b.txrqq,b.txrqz
t.inaccount_status,b.cph,b.lx,b.txrqq,b.txrqz
from
${dxhyTertiary}.t_dx_record_invoice t
left JOIN ${dxhyDetail}.t_dx_record_invoice_detail b ON t.uuid = b.uuid
WHERE t.invoice_date between #{kpksrq} and #{kpjsrq}
and t.company = #{company}
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' and invoiceStatus != '99' ">
<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 test="companyCode != null and companyCode != '' and companyCode == '88'">
and (t.comp_code = '' or t.comp_code is null)
</if>
<if test="bzdh != null and bzdh != '' and bzdh != 'null'">
and t.bzdh = #{bzdh}
</if>
<if test="bzr != null and bzr != '' and bzr != 'null'">
and t.bzr like concat('%',#{bzr},'%')
</if>
<if test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99' and inAccountStatus == '1'.toString()">
and t.inaccount_status = #{inAccountStatus}
</if>
<if test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99' and inAccountStatus == '0'.toString()">
and (t.inaccount_status = '0' or t.inaccount_status = '' or t.inaccount_status is null)
</if>
<if
test="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' and invoiceStatus != '99'">
and t.invoice_status = #{invoiceStatus}
</if>
<if test="qszt != null and qszt != '' and qszt != 'null' and qszt != '99'">
and t.qs_status = #{qszt}
</if>
<if test="qsfs != null and qsfs != '' and qsfs != 'null' and qsfs != '99'">
and t.qs_type = #{qsfs}
</if>
<if test="qsksrq != null and qsksrq != '' and qsksrq != 'null' and qsjsrq != null and qsjsrq != '' and qsjsrq != 'null'">
and t.qs_date between #{qsksrq} and #{qsjsrq}
</if>
<if test="rzksrq != null and rzksrq != '' and rzksrq != 'null' and rzjsrq != null and rzjsrq != '' and rzjsrq != 'null'">
and t.rzh_date between #{rzksrq} and #{rzjsrq}
<if test="voucherNumber != null and voucherNumber != ''">
and t.voucher_number like concat('%',concat(#{voucherNumber},'%'))
</if>
<if test="rzzt != null and rzzt != '' and rzzt != 'null' and rzzt != '99'">
and t.rzh_yesorno = #{rzzt}
</if>
<if test="rzclzt != null and rzclzt != '' and rzclzt != 'null' and rzclzt != '99'">
and t.auth_status = #{rzclzt}
</if>
<if test="rzlx != null and rzlx != '' and rzlx != 'null' and rzlx != '99'">
and t.bdk_status = #{rzlx}
</if>
<if
test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99'">
and t.invoice_type = #{invoiceType}
@ -88,8 +104,15 @@
and t.invoice_source = #{invoiceSource}
</if>
<if
test="qsfs != null and qsfs != '' and qsfs != 'null' and qsfs != '99' ">
and t.qs_type = #{qsfs}
test="fprzfs != null and fprzfs != '' and fprzfs != 'null' and fprzfs != '99'">
and t.rzh_type = #{fprzfs}
</if>
<if
test="fprzclzt != null and fprzclzt != '' and fprzclzt != 'null' and fprzclzt != '99'">
and t.auth_status = #{fprzclzt}
</if>
<if test="rzlx != null and rzlx != '' and rzlx != 'null' and rzlx != '99'">
and t.bdk_status = #{rzlx}
</if>
<if test="xfmc != null and xfmc != '' and xfmc != 'null' ">
and t.xf_name like CONCAT(#{xfmc},'%')
@ -111,32 +134,36 @@
<if test="taxAmountMax!=null and taxAmountMax!=''">
and t.tax_amount &lt;= #{taxAmountMax}
</if>
<if
test="invoiceNo != null and invoiceNo != '' and invoiceNo != 'null' ">
and t.invoice_no = #{invoiceNo}
</if>
<if test="skssq != null and skssq != '' and skssq != 'null' ">
and t.rzh_belong_date = #{skssq}
</if>
<if test="rzksrq != null and rzjsrq != null ">
and t.rzh_date between #{rzksrq} and #{rzjsrq}
<if test="qsr != null and qsr != '' and qsr != 'null' ">
and t.qs_name = #{qsr}
</if>
<if test="qsjsrq != null and qsjsrq != null ">
and t.qs_date between #{qsksrq} and #{qsjsrq}
<if test="rzhr != null and rzhr != '' and rzhr != 'null' ">
and t.confirm_user like CONCAT(#{rzhr},'%')
</if>
<if test="qsfs != null and qsfs != '' and qsfs != 'null' ">
and t.qs_type = #{qsfs}
<if test="settlementNo != null and settlementNo != ''">
and t.settlement_no like concat(#{settlementNo},'%')
</if>
<if test="glzt != null and glzt != '' and glzt != 'null' and glzt != '99'">
and t.glzt = #{glzt}
</if>
<if test="rzhr != null and rzhr != '' and rzhr != 'null' ">
and t.confirm_user like CONCAT(#{rzhr},'%')
<if test="invoiceNo != null and invoiceNo != '' and invoiceNo != 'null' ">
and t.invoice_no = #{invoiceNo}
</if>
<if test="qsr != null and qsr != '' and qsr != 'null' ">
and t.qs_name = #{qsr}
<if test="rzksrq != null and rzjsrq != null and rzksrq != '' and rzjsrq != ''">
and t.rzh_date between #{rzksrq} and #{rzjsrq}
</if>
<if test="businessCode != '99' and businessCode != null and businessCode != '' and businessCode != 'null' ">
<if test="skssq != null and skssq != '' and skssq != 'null' ">
and t.rzh_belong_date = #{skssq}
</if>
<if test="qsfs != null and qsfs != '' and qsfs != 'null' and qsfs != '99'">
and t.qs_type = #{qsfs}
</if>
<if test="qsksrq != null and qsjsrq != null and qsksrq != '' and qsjsrq != ''">
and t.qs_date between #{qsksrq} and #{qsjsrq}
</if>
<if
test="businessCode != '99' and businessCode != null and businessCode != '' and businessCode != 'null' ">
and t.dept_id = #{businessCode}
</if>
<if test="businessCode==''">
@ -149,16 +176,21 @@
</foreach>
) or (t.dept_id is null or t.dept_id='' or t.dept_id='99'))
</if>
<if test='inAccountStatus !=null and inAccountStatus!="" and inAccountStatus!="99"'>
and t.in_account_status = #{inAccountStatus}
<!-- <if test='inAccountStatus!=null and inAccountStatus != "" and inAccountStatus != "99"'>-->
<!-- and t.in_account_status = #{inAccountStatus}-->
<!-- </if>-->
<if test="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and t.sn_voucher_number = #{snVoucherNumber}
</if>
<if test="company !=null and company !=''">
and t.company = #{company}
<if test="postingTimeStart != null and postingTimeStart != '' and postingTimeStart != 'null' and postingTimeStart != '99' and postingTimeEnd != null and postingTimeEnd != '' and postingTimeEnd != 'null' and postingTimeEnd != '99'">
and posting_time between #{postingTimeStart} and #{postingTimeEnd}
</if>
<if test="voucherNumber!=null and voucherNumber!='' and voucherNumber!='null'">
and t.voucher_number like concat('%',concat(#{voucherNumber},'%'))
<if test="imageNumber != null and imageNumber != '' and imageNumber != 'null' and imageNumber != '99'">
and t.image_id = #{imageNumber}
</if>
<if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</if>
order by t.invoice_date desc
</select>
<select id="selectByPramsMap" parameterType="java.util.Map"
resultMap="BaseResultMap" databaseId="oracle">

@ -11,7 +11,7 @@
<result column="invoiceAmount" property="invoiceAmount"/>
<result column="taxAmount" property="taxAmount"/>
<result column="taxRate" property="sl"/>
<result column="in_account_status" property="inAccountStatus"/>
<result column="inaccount_status" property="inAccountStatus"/>
</resultMap>
<select id="selectByPramsMap" parameterType="java.util.Map"
@ -23,41 +23,58 @@
case when tdis.detail_amount is null then t.invoice_amount else tdis.detail_amount end as invoiceAmount,
case when tdis.tax_amount is null then t.tax_amount else tdis.tax_amount end as taxAmount,
tdis.tax_rate taxRate,
t.in_account_status
t.inaccount_status
from t_dx_record_invoice t
left join t_dx_record_invoice_statistics tdis
<!--on t.invoice_code = tdis.invoice_code and t.invoice_no = tdis.invoice_no-->
on t.invoice_no = tdis.invoice_no
and t.invoice_code = tdis.invoice_code
where
t.invoice_date between #{kpksrq} and #{kpjsrq}
and t.company = #{company}
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' and invoiceStatus != '99' ">
<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 test="companyCode != null and companyCode != '' and companyCode == '88'">
and (t.comp_code = '' or t.comp_code is null)
</if>
<if test="bzdh != null and bzdh != '' and bzdh != 'null'">
and t.bzdh = #{bzdh}
</if>
<if test="bzr != null and bzr != '' and bzr != 'null'">
and t.bzr like concat('%',#{bzr},'%')
</if>
<if test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99' and inAccountStatus == '1'.toString()">
and t.inaccount_status = #{inAccountStatus}
</if>
<if test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99' and inAccountStatus == '0'.toString()">
and (t.inaccount_status = '0' or t.inaccount_status = '' or t.inaccount_status is null)
</if>
<if
test="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' and invoiceStatus != '99'">
and t.invoice_status = #{invoiceStatus}
</if>
<if test="qszt != null and qszt != '' and qszt != 'null' and qszt != '99'">
and t.qs_status = #{qszt}
</if>
<if test="qsfs != null and qsfs != '' and qsfs != 'null' and qsfs != '99'">
and t.qs_type = #{qsfs}
</if>
<if test="qsksrq != null and qsksrq != '' and qsksrq != 'null' and qsjsrq != null and qsjsrq != '' and qsjsrq != 'null'">
and t.qs_date between #{qsksrq} and #{qsjsrq}
</if>
<if test="rzksrq != null and rzksrq != '' and rzksrq != 'null' and rzjsrq != null and rzjsrq != '' and rzjsrq != 'null'">
and t.rzh_date between #{rzksrq} and #{rzjsrq}
<if test="voucherNumber != null and voucherNumber != ''">
and t.voucher_number like concat('%',concat(#{voucherNumber},'%'))
</if>
<if test="rzzt != null and rzzt != '' and rzzt != 'null' and rzzt != '99'">
and t.rzh_yesorno = #{rzzt}
</if>
<if test="rzclzt != null and rzclzt != '' and rzclzt != 'null' and rzclzt != '99'">
and t.auth_status = #{rzclzt}
</if>
<if test="rzlx != null and rzlx != '' and rzlx != 'null' and rzlx != '99'">
and t.bdk_status = #{rzlx}
</if>
<if
test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99'">
and t.invoice_type = #{invoiceType}
@ -66,8 +83,15 @@
and t.invoice_source = #{invoiceSource}
</if>
<if
test="qsfs != null and qsfs != '' and qsfs != 'null' and qsfs != '99' ">
and t.qs_type = #{qsfs}
test="fprzfs != null and fprzfs != '' and fprzfs != 'null' and fprzfs != '99'">
and t.rzh_type = #{fprzfs}
</if>
<if
test="fprzclzt != null and fprzclzt != '' and fprzclzt != 'null' and fprzclzt != '99'">
and t.auth_status = #{fprzclzt}
</if>
<if test="rzlx != null and rzlx != '' and rzlx != 'null' and rzlx != '99'">
and t.bdk_status = #{rzlx}
</if>
<if test="xfmc != null and xfmc != '' and xfmc != 'null' ">
and t.xf_name like CONCAT(#{xfmc},'%')
@ -89,32 +113,36 @@
<if test="taxAmountMax!=null and taxAmountMax!=''">
and t.tax_amount &lt;= #{taxAmountMax}
</if>
<if
test="invoiceNo != null and invoiceNo != '' and invoiceNo != 'null' ">
and t.invoice_no = #{invoiceNo}
</if>
<if test="skssq != null and skssq != '' and skssq != 'null' ">
and t.rzh_belong_date = #{skssq}
</if>
<if test="rzksrq != null and rzjsrq != null ">
and t.rzh_date between #{rzksrq} and #{rzjsrq}
<if test="qsr != null and qsr != '' and qsr != 'null' ">
and t.qs_name = #{qsr}
</if>
<if test="qsjsrq != null and qsjsrq != null ">
and t.qs_date between #{qsksrq} and #{qsjsrq}
<if test="rzhr != null and rzhr != '' and rzhr != 'null' ">
and t.confirm_user like CONCAT(#{rzhr},'%')
</if>
<if test="qsfs != null and qsfs != '' and qsfs != 'null' ">
and t.qs_type = #{qsfs}
<if test="settlementNo != null and settlementNo != ''">
and t.settlement_no like concat(#{settlementNo},'%')
</if>
<if test="glzt != null and glzt != '' and glzt != 'null' and glzt != '99'">
and t.glzt = #{glzt}
</if>
<if test="rzhr != null and rzhr != '' and rzhr != 'null' ">
and t.confirm_user like CONCAT(#{rzhr},'%')
<if test="invoiceNo != null and invoiceNo != '' and invoiceNo != 'null' ">
and t.invoice_no = #{invoiceNo}
</if>
<if test="qsr != null and qsr != '' and qsr != 'null' ">
and t.qs_name = #{qsr}
<if test="rzksrq != null and rzjsrq != null and rzksrq != '' and rzjsrq != ''">
and t.rzh_date between #{rzksrq} and #{rzjsrq}
</if>
<if test="businessCode != '99' and businessCode != null and businessCode != '' and businessCode != 'null' ">
<if test="skssq != null and skssq != '' and skssq != 'null' ">
and t.rzh_belong_date = #{skssq}
</if>
<if test="qsfs != null and qsfs != '' and qsfs != 'null' and qsfs != '99'">
and t.qs_type = #{qsfs}
</if>
<if test="qsksrq != null and qsjsrq != null and qsksrq != '' and qsjsrq != ''">
and t.qs_date between #{qsksrq} and #{qsjsrq}
</if>
<if
test="businessCode != '99' and businessCode != null and businessCode != '' and businessCode != 'null' ">
and t.dept_id = #{businessCode}
</if>
<if test="businessCode==''">
@ -127,16 +155,21 @@
</foreach>
) or (t.dept_id is null or t.dept_id='' or t.dept_id='99'))
</if>
<if test='inAccountStatus !=null and inAccountStatus!="" and inAccountStatus!="99"'>
and t.in_account_status = #{inAccountStatus}
<!-- <if test='inAccountStatus!=null and inAccountStatus != "" and inAccountStatus != "99"'>-->
<!-- and t.in_account_status = #{inAccountStatus}-->
<!-- </if>-->
<if test="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and t.sn_voucher_number = #{snVoucherNumber}
</if>
<if test="company != null and company !=''">
and t.company = #{company}
<if test="postingTimeStart != null and postingTimeStart != '' and postingTimeStart != 'null' and postingTimeStart != '99' and postingTimeEnd != null and postingTimeEnd != '' and postingTimeEnd != 'null' and postingTimeEnd != '99'">
and posting_time between #{postingTimeStart} and #{postingTimeEnd}
</if>
<if test="voucherNumber!=null and voucherNumber!=''and voucherNumber!='null'">
and t.voucher_number like concat('%',concat(#{voucherNumber},'%'))
<if test="imageNumber != null and imageNumber != '' and imageNumber != 'null' and imageNumber != '99'">
and t.image_id = #{imageNumber}
</if>
<if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</if>
order by t.invoice_date desc
</select>
<select id="selectByPramsMap" parameterType="java.util.Map"
resultMap="BaseResultMap" databaseId="oracle">

Loading…
Cancel
Save