修改发票综合查询

release
yishiqihuasheng 2 years ago
parent 5fc7e1d871
commit 59512c6827
  1. 5
      dxhy-core/src/main/java/com/dxhy/core/model/BbfpzhcxRespVO.java
  2. 6
      dxhy-core/src/main/java/com/dxhy/core/service/export/impl/FpzhcxServiceImpl.java
  3. 16
      dxhy-core/src/main/java/com/dxhy/core/thread/FpzhcxExportThread.java
  4. 77
      dxhy-core/src/main/resources/mapper/BbfpzhMapper.xml

@ -170,6 +170,11 @@ public class BbfpzhcxRespVO implements Serializable {
private String voucherNumber;
private String illegalEnterprise;
private String bzr;
private String bzdh;
private String snVoucherNumber;
private String postingTime;
private String imageNumber;
private String accountPeriod;
public BbfpzhcxRespVO() {}

@ -97,6 +97,12 @@ public class FpzhcxServiceImpl extends MpBaseServiceImpl<BbfpzhDao, BbfpzhcxResp
}
}
// 字典转换
String inAccountStatus = vo.getInAccountStatus();
if ("1".equals(inAccountStatus)){
vo.setInAccountStatus("已入账");
}else {
vo.setInAccountStatus("未入账");
}
vo.setGlzt(dictdetaServcice.queryDictName(DictConstant.GLZT, vo.getGlzt()));
vo.setSettlementStatus(
dictdetaServcice.queryDictName(DictConstant.SETTLEMENT_STATUS, vo.getSettlementStatus()));

@ -137,13 +137,29 @@ public class FpzhcxExportThread extends BaseThread {
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 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");
JSONObject jsonObject = tabulateRedisService.getTabulateExcel(company, menuId);
// 参数转换为需要的形式
Map<String, Object> pramsMap = new HashMap<>(30);
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)) {

@ -37,6 +37,12 @@
<result column="voucher_number" property="voucherNumber"/>
<result column="total_amount" property="totalAmount"/>
<result column="bzr" property="bzr"/>
<result column="bzdh" property="bzdh"/>
<result column="inaccount_status" property="inAccountStatus"/>
<result column="sn_voucher_number" property="snVoucherNumber"/>
<result column="posting_time" property="postingTime"/>
<result column="image_id" property="imageNumber"/>
<result column="account_period" property="accountPeriod"/>
</resultMap>
<resultMap id="BbfpzhcxhjResultMap"
@ -50,7 +56,7 @@
resultMap="BaseResultMap" databaseId="mysql">
select
t.invoice_code,t.invoice_no,DATE_FORMAT(t.invoice_date,'%Y-%m-%d') kprq,t.gf_tax_no
gfsh,t.gf_name gfmc,t.bzr,
gfsh,t.gf_name gfmc,t.bzr,t.inaccount_status,t.bzdh,t.sn_voucher_number,t.posting_time,t.image_id,t.account_period,
t.xf_tax_no,t.xf_name,t.tax_amount,t.invoice_status,t.invoice_amount,t.dk_tax_amount,DATE_FORMAT(t.rzh_date,'%Y-%m-%d')
rzh_date ,DATE_FORMAT(t.qs_date,'%Y-%m-%d') qs_date,t.rzh_type,t.dept_id deptId,
t.gx_user_name,t.rzh_belong_date
@ -65,35 +71,41 @@
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<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 t.inaccount_status = #{inAccountStatus}
</if>
<if
test="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' and invoiceStatus != '99' ">
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="voucherNumber != null and voucherNumber != ''">
and t.voucher_number like concat('%',concat(#{voucherNumber},'%'))
</if>
<if test="qszt != null and qszt != '' and qszt != 'null' and qszt !='99' ">
and t.qs_status = #{qszt}
</if>
<if test="rzzt != null and rzzt != '' and rzzt != 'null' and rzzt !='99' ">
<if test="rzzt != null and rzzt != '' and rzzt != 'null' and rzzt != '99'">
and t.rzh_yesorno = #{rzzt}
</if>
<if test="bzr != null and bzr != '' and bzr != 'null'">
and t.bzr like concat('%',#{bzr},'%')
</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}
</if>
<if test="invoiceSource != null and invoiceSource != '' and invoiceSource != 'null' and invoiceSource != '99' ">
and t.invoice_source = #{invoiceSource}
</if>
<if
test="fprzfs_dm != null and fprzfs_dm != '' and fprzfs_dm != 'null' and fprzfs_dm !='99' ">
test="fprzfs != null and fprzfs != '' and fprzfs != 'null' and fprzfs != '99'">
and t.rzh_type = #{fprzfs}
</if>
<if
test="fprzclzt_dm != null and fprzclzt_dm != '' and fprzclzt_dm != 'null' and fprzclzt_dm !='99' ">
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'">
@ -102,9 +114,6 @@
<if test="xfmc != null and xfmc != '' and xfmc != 'null' ">
and t.xf_name like CONCAT(#{xfmc},'%')
</if>
<if test="settlementNo != null and settlementNo != ''">
and t.settlement_no like concat(#{settlementNo},'%')
</if>
<if test="xfsh != null and xfsh != '' and xfsh != 'null' ">
and SUBSTR(t.xf_tax_no , -6) = #{xfsh}
</if>
@ -122,33 +131,33 @@
<if test="taxAmountMax!=null and taxAmountMax!=''">
and t.tax_amount &lt;= #{taxAmountMax}
</if>
<if test="qsr != null and qsr != '' and qsr != 'null' ">
and t.qs_name = #{qsr}
</if>
<if test="rzhr != null and rzhr != '' and rzhr != 'null' ">
and t.confirm_user like CONCAT(#{rzhr},'%')
</if>
<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="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 ">
<if test="rzksrq != null and rzjsrq != null and rzksrq != '' and rzjsrq != ''">
and t.rzh_date between #{rzksrq} and #{rzjsrq}
</if>
<if test="qsjsrq != null and qsjsrq != null ">
and t.qs_date between #{qsksrq} and #{qsjsrq}
<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' ">
<if test="qsfs != null and qsfs != '' and qsfs != 'null' and qsfs != '99'">
and t.qs_type = #{qsfs}
</if>
<if test="company != null and company !=''">
and t.company = #{company}
<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' ">
@ -164,12 +173,20 @@
</foreach>
) or (t.dept_id is null or t.dept_id='' or t.dept_id='99'))
</if>
<if
test="exportMark != '99' and exportMark != null and exportMark != '' and exportMark != 'null'">
and t.export_mark = #{exportMark}
<!-- <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='inAccountStatus != null and inAccountStatus !="" and inAccountStatus!="99"'>
and t.in_account_status = #{inAccountStatus}
<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="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>

Loading…
Cancel
Save