订单列表:优化导出字段展示

beta
路明慧 1 year ago
parent 3db0b4d671
commit a6b7f39ad4
  1. 21
      jianshui-invoice/src/main/java/com/jianshui/invoice/domain/BillInfo.java
  2. 68
      jianshui-invoice/src/main/java/com/jianshui/invoice/service/impl/BillInfoServiceImpl.java

@ -159,7 +159,7 @@ public class BillInfo extends BaseEntity
private String tsfs;
/** 清单标志 */
@Excel(name = "清单标志")
@Excel(name = "清单标志 1清单0非清单")
private String qdbz;
/** 清单项目名称 */
@ -167,17 +167,20 @@ public class BillInfo extends BaseEntity
private String qdxmmc;
/** 代开标志 */
@Excel(name = "代开标志")
@Excel(name = "代开标志 0 非代开 1 代开")
private String dkbz;
/** 成品油标志 */
@Excel(name = "成品油标志")
@Excel(name = "成品油标志 0 非成品油 1 成品油")
private String cpybz;
/** 开票状态 */
@Excel(name = "开票状态")
private Integer state;
@Excel(name = "开票状态")
private String billState;
/** 订单来源 */
@Excel(name = "订单来源")
private String source;
@ -1327,10 +1330,20 @@ public class BillInfo extends BaseEntity
this.state = state;
}
public void setBillState(String billState)
{
this.billState = billState;
}
public Integer getState()
{
return state;
}
public String getBillState()
{
return billState;
}
public void setSource(String source)
{
this.source = source;

@ -1,11 +1,11 @@
package com.jianshui.invoice.service.impl;
import java.util.Arrays;
import java.util.List;
import java.util.*;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSONObject;
import com.jianshui.common.core.domain.AjaxResult;
import com.jianshui.common.core.domain.entity.SysDictData;
import com.jianshui.common.utils.DateUtils;
import com.jianshui.common.utils.DictUtils;
import com.jianshui.common.utils.spring.SpringUtils;
@ -15,12 +15,11 @@ import com.jianshui.invoice.mapper.InvoiceMapper;
import com.jianshui.queue.consumer.RedisQueueConsumer;
import com.jianshui.queue.dto.RedisQueueMessage;
import com.jianshui.queue.utils.RedisQueueUtil;
import com.jianshui.system.service.ISysDictTypeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import com.jianshui.common.utils.StringUtils;
import org.springframework.transaction.annotation.Transactional;
import com.jianshui.invoice.domain.BillDetail;
@ -43,6 +42,9 @@ public class BillInfoServiceImpl implements IBillInfoService {
@Autowired
private InvoiceMapper invoiceMapper;
@Autowired
private ISysDictTypeService dictTypeService;
/**
* 查询开票信息
*
@ -62,7 +64,63 @@ public class BillInfoServiceImpl implements IBillInfoService {
*/
@Override
public List<BillInfo> selectBillInfoList(BillInfo billInfo) {
return billInfoMapper.selectBillInfoList(billInfo);
List<BillInfo> billInfos = billInfoMapper.selectBillInfoList(billInfo);
if (CollectionUtil.isNotEmpty(billInfos)) {
Map<String,String> invoiceTypeDictMap = new HashMap<>(); ;
List<SysDictData> invoiceTypeData = dictTypeService.selectDictDataByType("invoice_type");
if (CollectionUtil.isNotEmpty(invoiceTypeData)){
invoiceTypeData.forEach(e->invoiceTypeDictMap.put(e.getDictValue(),e.getDictLabel()));
}
Map<String,String> billTypeDictMap = new HashMap<>(); ;
List<SysDictData> billTypeData = dictTypeService.selectDictDataByType("bill_type");
if (CollectionUtil.isNotEmpty(billTypeData)){
billTypeData.forEach(e->billTypeDictMap.put(e.getDictValue(),e.getDictLabel()));
}
Map<String,String> invocieStatusDictMap = new HashMap<>(); ;
List<SysDictData> invocieStatusData = dictTypeService.selectDictDataByType("invoice_status");
if (CollectionUtil.isNotEmpty(invocieStatusData)){
invocieStatusData.forEach(e->invocieStatusDictMap.put(e.getDictValue(),e.getDictLabel()));
}
Map<String,String> tsfsDictMap = new HashMap<>(); ;
List<SysDictData> tsfsData = dictTypeService.selectDictDataByType("tsfs");
if (CollectionUtil.isNotEmpty(tsfsData)){
tsfsData.forEach(e->tsfsDictMap.put(e.getDictValue(),e.getDictLabel()));
}
Map<String,String> sourceDictMap = new HashMap<>(); ;
List<SysDictData> sourceData = dictTypeService.selectDictDataByType("source");
if (CollectionUtil.isNotEmpty(sourceData)){
sourceData.forEach(e->sourceDictMap.put(e.getDictValue(),e.getDictLabel()));
}
for (BillInfo bill : billInfos) {
bill.setInvoiceType(invoiceTypeDictMap.get(bill.getInvoiceType()));
bill.setBillType(billTypeDictMap.get(bill.getBillType()));
bill.setBillState(invocieStatusDictMap.get(bill.getState()==null?"":bill.getState().toString()));
bill.setTsfs(tsfsDictMap.get(bill.getTsfs()));
bill.setSource(sourceDictMap.get(bill.getSource()));
}
}
return billInfos;
}
/**

Loading…
Cancel
Save