修改一场发票查询导出

release
yishiqihuasheng 2 years ago
parent 5e788a638b
commit 5fc7e1d871
  1. 1
      dxhy-core/src/main/java/com/dxhy/core/model/BbfpzhcxRespVO.java
  2. 7
      dxhy-core/src/main/java/com/dxhy/core/model/BbycfpcxRespVO.java
  3. 6
      dxhy-core/src/main/java/com/dxhy/core/service/export/impl/YcfpcxServiceImpl.java
  4. 2
      dxhy-core/src/main/java/com/dxhy/core/thread/FpzhcxExportThread.java
  5. 20
      dxhy-core/src/main/java/com/dxhy/core/thread/YcfpcxExportThread.java
  6. 6
      dxhy-core/src/main/resources/mapper/BbfpzhMapper.xml
  7. 47
      dxhy-core/src/main/resources/mapper/BbycfpcxMapper.xml
  8. 2
      dxhy-core/src/main/resources/mapper/FpZhMapper.xml

@ -169,6 +169,7 @@ public class BbfpzhcxRespVO implements Serializable {
private String remark;
private String voucherNumber;
private String illegalEnterprise;
private String bzr;
public BbfpzhcxRespVO() {}

@ -96,6 +96,13 @@ public class BbycfpcxRespVO implements Serializable {
private String rzlx;
private String skssq;
private String businessName;
private String bzdh;
private String bzr;
private String imageNumber;
private String snVoucherNumber;
private String accountPeriod;
private String postingTime;
private String inAccountStatus;
/**
* 合计数量

@ -69,6 +69,12 @@ public class YcfpcxServiceImpl extends MpBaseServiceImpl<BbycfpcxDao, BbycfpcxRe
vo.setJe(MathUtil.round(vo.getJe()));
vo.setSe(MathUtil.round(vo.getSe()));
// 字典转换
String inAccountStatus = vo.getInAccountStatus();
if ("1".equals(inAccountStatus)){
vo.setInAccountStatus("已入账");
}else {
vo.setInAccountStatus("未入账");
}
vo.setYczt(dictdetaServcice.queryDictName(DictConstant.INVOICE_STATUS, vo.getYczt()));
vo.setInvoiceType(
dictdetaServcice.queryDictName(DictConstant.INVOICE_TYPE_VAT, vo.getInvoiceType()));

@ -135,6 +135,7 @@ public class FpzhcxExportThread extends BaseThread {
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 inAccountStatus = prams.getString("inAccountStatus");
JSONObject jsonObject = tabulateRedisService.getTabulateExcel(company, menuId);
@ -142,6 +143,7 @@ public class FpzhcxExportThread extends BaseThread {
Map<String, Object> pramsMap = new HashMap<>(30);
pramsMap.put("dbName", dbName);
pramsMap.put("business", businesses);
pramsMap.put("bzr",bzr);
List<String> gfshList = new ArrayList<>();
if (!StringHelper.isBlank(gfsh)) {

@ -20,6 +20,7 @@ import com.dxhy.oss.service.FileService;
import cn.hutool.core.date.DateUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
/**
* 报表发票综合查询导出
@ -125,11 +126,30 @@ public class YcfpcxExportThread extends BaseThread {
String menuId = prams.getString("menuId");
List<Business> businessList = (List<Business>)prams.get("business");
String businessCode = prams.getString("businessCode");
String bzr = prams.getString("bzr");
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 (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<>(16);
pramsMap.put("dbName", dbName);
pramsMap.put("business", businessList);
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);

@ -36,6 +36,7 @@
<result column="settlement_status" property="settlementStatus"/>
<result column="voucher_number" property="voucherNumber"/>
<result column="total_amount" property="totalAmount"/>
<result column="bzr" property="bzr"/>
</resultMap>
<resultMap id="BbfpzhcxhjResultMap"
@ -49,7 +50,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,
gfsh,t.gf_name gfmc,t.bzr,
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
@ -77,6 +78,9 @@
<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' ">
and t.invoice_type = #{invoiceType}

@ -8,7 +8,13 @@
<result column="fpdm" property="fpdm"/>
<result column="fphm" property="fphm"/>
<result column="invoiceType" property="invoiceType"/>
<result column="sn_voucher_number" property="snVoucherNumber"/>
<result column="bzdh" property="bzdh"/>
<result column="bzr" property="bzr"/>
<result column="account_period" property="accountPeriod"/>
<result column="posting_time" property="postingTime"/>
<result column="image_id" property="imageNumber"/>
<result column="inaccount_status" property="inAccountStatus"/>
<result column="kprq" property="kprq"/>
<result column="gfsh" property="gfsh"/>
<result column="gfmc" property="gfmc"/>
@ -35,7 +41,7 @@
resultMap="BaseResultMap" databaseId="mysql">
select
t.invoice_code fpdm, t.invoice_no fphm ,t.invoice_type invoiceType,DATE_FORMAT(t.invoice_date,'%Y-%m-%d')
kprq,t.gf_tax_no gfsh,t.gf_name gfmc,
kprq,t.gf_tax_no gfsh,t.gf_name gfmc,t.inaccount_status,t.bzdh,t.bzr,t.sn_voucher_number,t.account_period,t.posting_time,t.image_id,
t.xf_tax_no xfsh,t.xf_name xfmc,t.tax_amount se,t.invoice_amount je,DATE_FORMAT(t.qs_date,'%Y-%m-%d') qsrq,
t.qs_status qszt,t.qs_name qsr, t.invoice_status yczt,DATE_FORMAT(t.status_update_date,'%Y-%m-%d') ycsj ,
DATE_FORMAT(t.rzh_date,'%Y-%m-%d') rzsj,t.rzh_yesorno rzzt,t.auth_status rzclzt,t.bdk_status
@ -44,30 +50,51 @@
WHERE t.invoice_status != '0'
and t.invoice_type in ('01','03','08','14','31')
and 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="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="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and t.sn_voucher_number = #{snVoucherNumber}
</if>
<if test="postingTimeStart != null and postingTimeStart != '' and postingTimeStart != 'null' and postingTimeStart != '99' and postingTimeEnd != null and postingTimeEnd != '' and postingTimeEnd != 'null' and postingTimeEnd != '99'">
and t.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>
<if
test="yczt != null and yczt != '' and yczt != 'null' and yczt != '99' ">
test="yczt != null and yczt != '' and yczt != 'null' ">
and t.invoice_status = #{yczt}
</if>
<if test="qszt != null and qszt != '' and qszt != 'null' and yczt != '99' ">
<if test="qszt != null and qszt != '' and qszt != 'null' ">
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 != 3">
and t.rzh_yesorno = #{rzzt}
</if>
<if test="rzzt != null and rzzt == 3">
and (t.rzh_yesorno = '2' OR t.rzh_yesorno = '1')
</if>
<if test="xfmc != null and xfmc != '' and xfmc != 'null' ">
and t.xf_name like CONCAT(#{xfmc},'%')
</if>
<if
test="invoiceNo != null and invoiceNo != '' and invoiceNo != 'null' ">
<if test="invoiceNo != null and invoiceNo != '' and invoiceNo != 'null' ">
and t.invoice_no = #{invoiceNo}
</if>
<if test="company != null and company !=''">
and t.company = #{company}
</if>
<if test="businessCode != '99' and businessCode != null and businessCode != '' and businessCode != 'null' ">
and t.dept_id = #{businessCode}
</if>

@ -104,7 +104,7 @@
</foreach>
<if test="companyCode != null and companyCode != '99' and companyCode != '88' and companyCode != '' and companyCode != 'null'" >
and t.comp_code = #{companyCodes}
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)

Loading…
Cancel
Save