Commit c08901c2 authored by xulihui's avatar xulihui

供需平衡气量监管新增液化气相关信息,气量监管和日用气量上报新增所属区域,根据时间和所属区域生成汇总分析和结果导出

parent 6e5cb467
...@@ -98,7 +98,7 @@ public class TPublicSentimentController extends BaseController ...@@ -98,7 +98,7 @@ public class TPublicSentimentController extends BaseController
/** /**
* 导出投诉处置列表 * 导出投诉处置列表
*/ */
@Log(title = "投诉处置", businessType = BusinessType.EXPORT) @Log(title = "舆情处置", businessType = BusinessType.EXPORT)
@PostMapping("/sentimentSummaryAnalysisExport") @PostMapping("/sentimentSummaryAnalysisExport")
public void sentimentSummaryAnalysisExport(HttpServletResponse httpServletResponse, public void sentimentSummaryAnalysisExport(HttpServletResponse httpServletResponse,
@RequestBody ComplainDealSummaryAnalysisTableVo complainDealSummaryAnalysisTableVo) throws Exception @RequestBody ComplainDealSummaryAnalysisTableVo complainDealSummaryAnalysisTableVo) throws Exception
......
...@@ -10,11 +10,14 @@ import com.zehong.common.utils.SecurityUtils; ...@@ -10,11 +10,14 @@ import com.zehong.common.utils.SecurityUtils;
import com.zehong.common.utils.poi.ExcelUtil; import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.Statistics; import com.zehong.system.domain.Statistics;
import com.zehong.system.domain.TSupBalGasSup; import com.zehong.system.domain.TSupBalGasSup;
import com.zehong.system.domain.vo.ComplainDealSummaryAnalysisTableVo;
import com.zehong.system.domain.vo.SupBalGasSupSummaryAnalysisTableVo;
import com.zehong.system.service.ITSupBalGasSupService; import com.zehong.system.service.ITSupBalGasSupService;
import com.zehong.web.controller.tool.TimeConfig; import com.zehong.web.controller.tool.TimeConfig;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -185,4 +188,21 @@ public class TSupBalGasSupController extends BaseController ...@@ -185,4 +188,21 @@ public class TSupBalGasSupController extends BaseController
return AjaxResult.error("上传气量监管记录接口异常"); return AjaxResult.error("上传气量监管记录接口异常");
} }
} }
@GetMapping("/sentimentSummaryAnalysisMethodTableViews")
public AjaxResult sentimentSummaryAnalysisMethodTableViews(SupBalGasSupSummaryAnalysisTableVo supBalGasSupSummaryAnalysisTableVo) {
return AjaxResult.success(tSupBalGasSupService.sentimentSummaryAnalysisMethodTableViews(supBalGasSupSummaryAnalysisTableVo));
}
/**
* 导出投诉处置列表
*/
@Log(title = "供需平衡统计", businessType = BusinessType.EXPORT)
@PostMapping("/sentimentSummaryAnalysisExport")
public void sentimentSummaryAnalysisExport(HttpServletResponse httpServletResponse,
@RequestBody SupBalGasSupSummaryAnalysisTableVo supBalGasSupSummaryAnalysisTableVo) throws Exception
{
tSupBalGasSupService.sentimentSummaryAnalysisExport(httpServletResponse,supBalGasSupSummaryAnalysisTableVo);
}
} }
...@@ -206,6 +206,17 @@ public class TStaEnterpriseInfor extends BaseEntity { ...@@ -206,6 +206,17 @@ public class TStaEnterpriseInfor extends BaseEntity {
private String isReport; private String isReport;
/*年度*/
private String fYear;
public String getfYear() {
return fYear;
}
public void setfYear(String fYear) {
this.fYear = fYear;
}
public void setfEnterpriseId(Long fEnterpriseId) { public void setfEnterpriseId(Long fEnterpriseId) {
this.fEnterpriseId = fEnterpriseId; this.fEnterpriseId = fEnterpriseId;
} }
......
...@@ -42,6 +42,24 @@ public class TSupBalGasSup extends BaseEntity ...@@ -42,6 +42,24 @@ public class TSupBalGasSup extends BaseEntity
@Excel(name = "存储量") @Excel(name = "存储量")
private Long fStorageVol; private Long fStorageVol;
/** 液化气计划量 */
@Excel(name = "液化气计划量")
private Long fPlanYhq;
/** 液化气批复量 */
@Excel(name = "液化气批复量")
private Long fApprYhq;
/** 液化气供气量 */
@Excel(name = "液化气供气量")
private Long fSupGasYhq;
/** 液化气存储量 */
@Excel(name = "液化气存储量")
private Long fStorageYhq;
/** 监管气量日期 */ /** 监管气量日期 */
@Excel(name = "监管气量日期", dateFormat = "yyyy-MM-dd HH:mm:ss") @Excel(name = "监管气量日期", dateFormat = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
...@@ -89,6 +107,27 @@ public class TSupBalGasSup extends BaseEntity ...@@ -89,6 +107,27 @@ public class TSupBalGasSup extends BaseEntity
@Excel(name = "上报省厅日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm") @Excel(name = "上报省厅日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
private Date fGovUploadTime; private Date fGovUploadTime;
/*所属区域*/
private String township;
private String createTimeYear;
public String getCreateTimeYear() {
return createTimeYear;
}
public void setCreateTimeYear(String createTimeYear) {
this.createTimeYear = createTimeYear;
}
public String getTownship() {
return township;
}
public void setTownship(String township) {
this.township = township;
}
public void setfGasSupId(Long fGasSupId) public void setfGasSupId(Long fGasSupId)
{ {
this.fGasSupId = fGasSupId; this.fGasSupId = fGasSupId;
...@@ -254,6 +293,38 @@ public class TSupBalGasSup extends BaseEntity ...@@ -254,6 +293,38 @@ public class TSupBalGasSup extends BaseEntity
this.fGovUploadTime = fGovUploadTime; this.fGovUploadTime = fGovUploadTime;
} }
public Long getfPlanYhq() {
return fPlanYhq;
}
public void setfPlanYhq(Long fPlanYhq) {
this.fPlanYhq = fPlanYhq;
}
public Long getfApprYhq() {
return fApprYhq;
}
public void setfApprYhq(Long fApprYhq) {
this.fApprYhq = fApprYhq;
}
public Long getfSupGasYhq() {
return fSupGasYhq;
}
public void setfSupGasYhq(Long fSupGasYhq) {
this.fSupGasYhq = fSupGasYhq;
}
public Long getfStorageYhq() {
return fStorageYhq;
}
public void setfStorageYhq(Long fStorageYhq) {
this.fStorageYhq = fStorageYhq;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
...@@ -68,7 +68,7 @@ public class TSupBalUsgDay extends BaseEntity ...@@ -68,7 +68,7 @@ public class TSupBalUsgDay extends BaseEntity
private Long fGasUsage; private Long fGasUsage;
/** 液化石油气城镇居民用量 */ /** 液化石油气城镇居民用量 */
@Excel(name = "液化石油气城镇居民用量(万立方米)") @Excel(name = "液化石油气城镇居民用量()")
private Long fUrbanLpgUsage; private Long fUrbanLpgUsage;
/** 液化石油气农村居民用量(吨) */ /** 液化石油气农村居民用量(吨) */
...@@ -142,6 +142,27 @@ public class TSupBalUsgDay extends BaseEntity ...@@ -142,6 +142,27 @@ public class TSupBalUsgDay extends BaseEntity
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date endCurrentMonthDate; private Date endCurrentMonthDate;
/*所属区域*/
private String township;
private String createTimeYear;
public String getCreateTimeYear() {
return createTimeYear;
}
public void setCreateTimeYear(String createTimeYear) {
this.createTimeYear = createTimeYear;
}
public String getTownship() {
return township;
}
public void setTownship(String township) {
this.township = township;
}
public void setfRepUsgDayId(Long fRepUsgDayId) public void setfRepUsgDayId(Long fRepUsgDayId)
{ {
this.fRepUsgDayId = fRepUsgDayId; this.fRepUsgDayId = fRepUsgDayId;
......
package com.zehong.system.domain.vo;
/**
* 投诉处置统计分析 - 表格形式
*/
public class SupBalGasSupSummaryAnalysisTableVo {
/**
* 日期
*/
private String date;
/**
* 天然气供气总量
*/
private String supgasvolNum;
/**
* 天然气用气总量
*/
private String supgasuseNum;
/**
* 天然气供需差额
*/
private String supgasuseBalance;
/**
* 液化气供气总量
*/
private String liqgasvolNum;
/**
* 液化气用气总量
*/
private String liqgasuseNum;
/**
* 液化气供需差额
*/
private String liqgasuseBalance;
/**
* 导出时传的 动态标头
*/
private String dynamicTitle;
//所属区域
private String township;
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public String getSupgasvolNum() {
return supgasvolNum;
}
public void setSupgasvolNum(String supgasvolNum) {
this.supgasvolNum = supgasvolNum;
}
public String getSupgasuseNum() {
return supgasuseNum;
}
public void setSupgasuseNum(String supgasuseNum) {
this.supgasuseNum = supgasuseNum;
}
public String getSupgasuseBalance() {
return supgasuseBalance;
}
public void setSupgasuseBalance(String supgasuseBalance) {
this.supgasuseBalance = supgasuseBalance;
}
public String getLiqgasvolNum() {
return liqgasvolNum;
}
public void setLiqgasvolNum(String liqgasvolNum) {
this.liqgasvolNum = liqgasvolNum;
}
public String getLiqgasuseNum() {
return liqgasuseNum;
}
public void setLiqgasuseNum(String liqgasuseNum) {
this.liqgasuseNum = liqgasuseNum;
}
public String getLiqgasuseBalance() {
return liqgasuseBalance;
}
public void setLiqgasuseBalance(String liqgasuseBalance) {
this.liqgasuseBalance = liqgasuseBalance;
}
public String getDynamicTitle() {
return dynamicTitle;
}
public void setDynamicTitle(String dynamicTitle) {
this.dynamicTitle = dynamicTitle;
}
public String getTownship() {
return township;
}
public void setTownship(String township) {
this.township = township;
}
}
package com.zehong.system.mapper; package com.zehong.system.mapper;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.zehong.system.domain.Statistics; import com.zehong.system.domain.Statistics;
import com.zehong.system.domain.TSupBalGasSup; import com.zehong.system.domain.TSupBalGasSup;
import com.zehong.system.domain.dto.TComplainDealDTO;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P; import org.springframework.security.core.parameters.P;
...@@ -70,4 +72,9 @@ public interface TSupBalGasSupMapper ...@@ -70,4 +72,9 @@ public interface TSupBalGasSupMapper
* 获取上报信息 * 获取上报信息
*/ */
TSupBalGasSup getReportInfoByCompany(Map<String, String> param); TSupBalGasSup getReportInfoByCompany(Map<String, String> param);
public List<TSupBalGasSup> queryAllByNotDeleteAndCreateTime(@Param("startOfMonth") Date startOfMonth,
@Param("endOfMonth") Date endOfMonth,
@Param("township") String township);
} }
package com.zehong.system.mapper; package com.zehong.system.mapper;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.zehong.system.domain.TSupBalGasSup;
import com.zehong.system.domain.TSupBalUsgDay; import com.zehong.system.domain.TSupBalUsgDay;
import org.apache.ibatis.annotations.Param;
/** /**
* 供需平衡-企业每日填报Mapper接口 * 供需平衡-企业每日填报Mapper接口
...@@ -64,4 +68,8 @@ public interface TSupBalUsgDayMapper ...@@ -64,4 +68,8 @@ public interface TSupBalUsgDayMapper
* 获取上报信息 * 获取上报信息
*/ */
TSupBalUsgDay getReportInfoByCompany(Map<String, String> param); TSupBalUsgDay getReportInfoByCompany(Map<String, String> param);
public List<TSupBalUsgDay> queryAllByNotDeleteAndCreateTime(@Param("startOfMonth") Date startOfMonth,
@Param("endOfMonth") Date endOfMonth,
@Param("township") String township);
} }
package com.zehong.system.service; package com.zehong.system.service;
import java.io.IOException;
import java.util.List; import java.util.List;
import com.zehong.system.domain.Statistics; import com.zehong.system.domain.Statistics;
import com.zehong.system.domain.TSupBalGasSup; import com.zehong.system.domain.TSupBalGasSup;
import com.zehong.system.domain.vo.ComplainDealSummaryAnalysisTableVo;
import com.zehong.system.domain.vo.SupBalGasSupSummaryAnalysisTableVo;
import javax.servlet.http.HttpServletResponse;
/** /**
* 供需平衡-气量监管Service接口 * 供需平衡-气量监管Service接口
...@@ -83,4 +88,11 @@ public interface ITSupBalGasSupService ...@@ -83,4 +88,11 @@ public interface ITSupBalGasSupService
* @return * @return
*/ */
int reportSupBalGasSupRecInfo(Long fGasSupId); int reportSupBalGasSupRecInfo(Long fGasSupId);
public List<SupBalGasSupSummaryAnalysisTableVo> sentimentSummaryAnalysisMethodTableViews(SupBalGasSupSummaryAnalysisTableVo supBalGasSupSummaryAnalysisTableVo);
public void sentimentSummaryAnalysisExport(HttpServletResponse httpServletResponse, SupBalGasSupSummaryAnalysisTableVo supBalGasSupSummaryAnalysisTableVo) throws IOException;
} }
package com.zehong.system.service.impl; package com.zehong.system.service.impl;
import java.util.Date; import java.io.IOException;
import java.util.HashMap; import java.math.BigDecimal;
import java.util.List; import java.net.URLEncoder;
import java.util.Map; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.alibaba.excel.EasyExcel;
import com.zehong.common.core.domain.entity.SysRole; import com.zehong.common.core.domain.entity.SysRole;
import com.zehong.common.utils.DateUtils; import com.zehong.common.utils.DateUtils;
import com.zehong.common.utils.SecurityUtils; import com.zehong.common.utils.SecurityUtils;
import com.zehong.common.utils.StringUtils;
import com.zehong.system.config.easyexcel.CustomCellWriteHeightConfig;
import com.zehong.system.config.easyexcel.CustomCellWriteWidthConfig;
import com.zehong.system.domain.Statistics; import com.zehong.system.domain.Statistics;
import com.zehong.system.domain.TSupBalUsgDay;
import com.zehong.system.domain.dto.TComplainDealDTO;
import com.zehong.system.domain.vo.ComplainDealSummaryAnalysisTableVo;
import com.zehong.system.domain.vo.SupBalGasSupSummaryAnalysisTableVo;
import com.zehong.system.mapper.TSupBalUsgDayMapper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TSupBalGasSupMapper; import com.zehong.system.mapper.TSupBalGasSupMapper;
import com.zehong.system.domain.TSupBalGasSup; import com.zehong.system.domain.TSupBalGasSup;
import com.zehong.system.service.ITSupBalGasSupService; import com.zehong.system.service.ITSupBalGasSupService;
import javax.servlet.http.HttpServletResponse;
/** /**
* 供需平衡-气量监管Service业务层处理 * 供需平衡-气量监管Service业务层处理
* *
...@@ -27,6 +38,8 @@ public class TSupBalGasSupServiceImpl implements ITSupBalGasSupService ...@@ -27,6 +38,8 @@ public class TSupBalGasSupServiceImpl implements ITSupBalGasSupService
{ {
@Autowired @Autowired
private TSupBalGasSupMapper tSupBalGasSupMapper; private TSupBalGasSupMapper tSupBalGasSupMapper;
@Autowired
private TSupBalUsgDayMapper tSupBalUsgDayMapper;
/** /**
* 查询供需平衡-气量监管 * 查询供需平衡-气量监管
...@@ -143,6 +156,166 @@ public class TSupBalGasSupServiceImpl implements ITSupBalGasSupService ...@@ -143,6 +156,166 @@ public class TSupBalGasSupServiceImpl implements ITSupBalGasSupService
return tSupBalGasSupMapper.updateTSupBalGasSup(tSupBalGasSup); return tSupBalGasSupMapper.updateTSupBalGasSup(tSupBalGasSup);
} }
@Override
public List<SupBalGasSupSummaryAnalysisTableVo> sentimentSummaryAnalysisMethodTableViews(SupBalGasSupSummaryAnalysisTableVo supBalGasSupSummaryAnalysisTableVo) {
String date1 = supBalGasSupSummaryAnalysisTableVo.getDate();
if(StringUtils.isEmpty(date1)) {
return initEmptyList();
}
//查询当前年的开始时间和结束时间
Date startOfMonth = DateUtils.parseDate(date1 + "-01-01 00:00:00");
Date endOfMonth = DateUtils.parseDate(date1 + "-12-31 23:59:59");;
String township = supBalGasSupSummaryAnalysisTableVo.getTownship();
List<TSupBalGasSup> tSupBalGasSups = tSupBalGasSupMapper.queryAllByNotDeleteAndCreateTime(startOfMonth,endOfMonth,township);
List<TSupBalUsgDay> tSupBalUsgDays = tSupBalUsgDayMapper.queryAllByNotDeleteAndCreateTime(startOfMonth,endOfMonth,township);
//先初始化一个空的,然后再循环往里面放值
List<SupBalGasSupSummaryAnalysisTableVo> supBalGasSupSummaryAnalysisTableVosEmpty = initEmptyList();
//如果没数据,就返回一个都是null的数据的集合
if(tSupBalGasSups.size() == 0 && tSupBalUsgDays.size() == 0) {
return supBalGasSupSummaryAnalysisTableVosEmpty;
}
Map<String, List<TSupBalGasSup>> tSupBalGasSupsCollect = tSupBalGasSups.stream().collect(Collectors.groupingBy(TSupBalGasSup::getCreateTimeYear));
Map<String, List<TSupBalUsgDay>> tSupBalUsgDaysCollect = tSupBalUsgDays.stream().collect(Collectors.groupingBy(TSupBalUsgDay::getCreateTimeYear));
long supgasvolTotal = 0;
long supgasuseTotal = 0;
long liqgasvolTotal = 0;
long liqgasuseTotal = 0;
for (int i = 0; i < supBalGasSupSummaryAnalysisTableVosEmpty.size(); i++) {
List<TSupBalGasSup> tSupBalGasSups1 = tSupBalGasSupsCollect.get(i+1+"");
List<TSupBalUsgDay> tSupBalUsgDays1 = tSupBalUsgDaysCollect.get(i+1+"");
long supgasvolNum = 0;
long liqgasvolNum = 0;
long supgasuseNum = 0;
long liqgasuseNum = 0;
if(tSupBalGasSups1 == null){
supBalGasSupSummaryAnalysisTableVosEmpty.get(i).setSupgasvolNum("0");
supBalGasSupSummaryAnalysisTableVosEmpty.get(i).setLiqgasvolNum("0");
}else {
supgasvolNum = tSupBalGasSupsCollect.get(i+1+"").stream().mapToLong(TSupBalGasSup::getfSupGasVol).sum();
supgasvolTotal += supgasvolNum;
supBalGasSupSummaryAnalysisTableVosEmpty.get(i).setSupgasvolNum(String.valueOf(supgasvolNum));
liqgasvolNum = tSupBalGasSupsCollect.get(i+1+"").stream().mapToLong(TSupBalGasSup::getfSupGasYhq).sum();
liqgasvolTotal += liqgasvolNum;
supBalGasSupSummaryAnalysisTableVosEmpty.get(i).setLiqgasvolNum(String.valueOf(liqgasvolNum));
}
if(tSupBalUsgDays1 == null){
supBalGasSupSummaryAnalysisTableVosEmpty.get(i).setSupgasuseNum("0");
supBalGasSupSummaryAnalysisTableVosEmpty.get(i).setLiqgasuseNum("0");
}else {
supgasuseNum = tSupBalUsgDaysCollect.get(i+1+"").stream().mapToLong(TSupBalUsgDay::getfGasUsage).sum();
supgasuseTotal += supgasuseNum;
supBalGasSupSummaryAnalysisTableVosEmpty.get(i).setSupgasuseNum(String.valueOf(supgasuseNum));
liqgasuseNum = tSupBalUsgDaysCollect.get(i+1+"").stream().mapToLong(TSupBalUsgDay::getfLpgUsage).sum();
liqgasuseTotal += liqgasuseNum;
supBalGasSupSummaryAnalysisTableVosEmpty.get(i).setLiqgasuseNum(String.valueOf(liqgasuseNum));
}
supBalGasSupSummaryAnalysisTableVosEmpty.get(i).setSupgasuseBalance(String.valueOf(supgasvolNum-supgasuseNum));
supBalGasSupSummaryAnalysisTableVosEmpty.get(i).setLiqgasuseBalance(String.valueOf(liqgasvolNum-liqgasuseNum));
//说明是 统计
if (i == 12 ) {
//supBalGasSupSummaryAnalysisTableVosEmpty.stream().mapToLong(SupBalGasSupSummaryAnalysisTableVo::getSupgasvolNum).sum()
supBalGasSupSummaryAnalysisTableVosEmpty.get(i).setSupgasvolNum(String.valueOf(supgasvolTotal));
supBalGasSupSummaryAnalysisTableVosEmpty.get(i).setSupgasuseNum(String.valueOf(supgasuseTotal));
supBalGasSupSummaryAnalysisTableVosEmpty.get(i).setSupgasuseBalance(String.valueOf(supgasvolTotal-supgasuseTotal));
supBalGasSupSummaryAnalysisTableVosEmpty.get(i).setLiqgasvolNum(String.valueOf(liqgasvolTotal));
supBalGasSupSummaryAnalysisTableVosEmpty.get(i).setLiqgasuseNum(String.valueOf(liqgasuseTotal));
supBalGasSupSummaryAnalysisTableVosEmpty.get(i).setLiqgasuseBalance(String.valueOf(liqgasvolTotal-liqgasuseTotal));
}
}
return supBalGasSupSummaryAnalysisTableVosEmpty;
}
private List<SupBalGasSupSummaryAnalysisTableVo> initEmptyList() {
List<SupBalGasSupSummaryAnalysisTableVo> supBalGasSupSummaryAnalysisTableVos = new ArrayList<>(13);
SupBalGasSupSummaryAnalysisTableVo supBalGasSupSummaryAnalysisTableVo;
for (int i = 0; i < 13; i++) {
supBalGasSupSummaryAnalysisTableVo = new SupBalGasSupSummaryAnalysisTableVo();
if (i <12) {
supBalGasSupSummaryAnalysisTableVo.setDate((i + 1) + "月");
} else {
supBalGasSupSummaryAnalysisTableVo.setDate("统计");
}
supBalGasSupSummaryAnalysisTableVo.setLiqgasvolNum( null);
supBalGasSupSummaryAnalysisTableVo.setLiqgasuseNum(null);
supBalGasSupSummaryAnalysisTableVo.setLiqgasuseBalance(null);
supBalGasSupSummaryAnalysisTableVo.setSupgasvolNum(null);
supBalGasSupSummaryAnalysisTableVo.setSupgasuseNum(null);
supBalGasSupSummaryAnalysisTableVo.setSupgasuseBalance(null);
supBalGasSupSummaryAnalysisTableVos.add(supBalGasSupSummaryAnalysisTableVo);
}
return supBalGasSupSummaryAnalysisTableVos;
}
@Override
public void sentimentSummaryAnalysisExport(HttpServletResponse response, SupBalGasSupSummaryAnalysisTableVo supBalGasSupSummaryAnalysisTableVo) throws IOException {
List<SupBalGasSupSummaryAnalysisTableVo> supBalGasSupSummaryAnalysisTableVos = sentimentSummaryAnalysisMethodTableViews(supBalGasSupSummaryAnalysisTableVo);
// 设置动态头
String dynamicTitle = supBalGasSupSummaryAnalysisTableVo.getDynamicTitle();
List<List<String>> headList = new ArrayList<>();
List<String> head0 = new ArrayList<>();
head0.add(dynamicTitle);
head0.add("日期");
List<String> head1 = new ArrayList<>();
head1.add(dynamicTitle);
head1.add("天然气供气量");
List<String> head2 = new ArrayList<>();
head2.add(dynamicTitle);
head2.add("天然气用气量");
List<String> head3 = new ArrayList<>();
head3.add(dynamicTitle);
head3.add("天然气供需差额");
List<String> head4 = new ArrayList<>();
head4.add(dynamicTitle);
head4.add("液化气供气量");
List<String> head5 = new ArrayList<>();
head5.add(dynamicTitle);
head5.add("液化气用气量");
List<String> head6 = new ArrayList<>();
head6.add(dynamicTitle);
head6.add("液化气供需差额");
headList.add(head0);
headList.add(head1);
headList.add(head2);
headList.add(head3);
headList.add(head4);
headList.add(head5);
headList.add(head6);
List<List<Object>> dataList = supBalGasSupSummaryAnalysisTableVos.stream().map(vo -> {
List<Object> objectList = new ArrayList<>();
objectList.add(vo.getDate());
objectList.add(vo.getSupgasvolNum());
objectList.add(vo.getSupgasuseNum());
objectList.add(vo.getSupgasuseBalance());
objectList.add(vo.getLiqgasvolNum());
objectList.add(vo.getLiqgasuseNum());
objectList.add(vo.getLiqgasuseBalance());
return objectList;
}).collect(Collectors.toList());
// 设置响应头
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("utf-8");
// 设置防止中文名乱码
String filename = URLEncoder.encode("供需平衡汇总分析", "utf-8");
response.setHeader("content-disposition", "attachment;filename=" + filename + ".xlsx");
// 先仅仅写入头,再以不写入头的方式写入数据
EasyExcel.write(response.getOutputStream())
.registerWriteHandler(new CustomCellWriteHeightConfig())
.registerWriteHandler(new CustomCellWriteWidthConfig()).head(headList).sheet("供需平衡汇总分析列表").doWrite(dataList);
}
/** /**
* 判断是否为政府角色 * 判断是否为政府角色
......
...@@ -34,10 +34,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -34,10 +34,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="fCreateTime" column="f_create_time" /> <result property="fCreateTime" column="f_create_time" />
<result property="fUpdateTime" column="f_update_time" /> <result property="fUpdateTime" column="f_update_time" />
<result property="isReport" column="is_report"/> <result property="isReport" column="is_report"/>
<result property="fYear" column="f_year" />
</resultMap> </resultMap>
<sql id="selectTStaEnterpriseInforVo"> <sql id="selectTStaEnterpriseInforVo">
select f_enterprise_id, f_city_name, f_district_name, f_biz_code, f_company_name, f_pipeline_cert_code, f_pipeline_comp, f_station_cert_code, f_station_comp, f_other_cert_code, f_other_comp, f_responsible_count, f_management_count, f_maintenance_count, f_responsible_cert_count, f_management_cert_count, f_maintenance_cert_count, f_station_count, f_storage_station_count, f_gasification_station_count, f_mixing_station_count, f_gas_station_count, f_filling_station_count, f_supply_station_count, f_pressure_station_count, f_other_station_count, f_create_time, f_update_time, is_report from t_sta_enterprise_infor select f_enterprise_id, f_city_name, f_district_name, f_biz_code, f_company_name, f_pipeline_cert_code, f_pipeline_comp, f_station_cert_code, f_station_comp, f_other_cert_code, f_other_comp, f_responsible_count, f_management_count, f_maintenance_count, f_responsible_cert_count, f_management_cert_count, f_maintenance_cert_count, f_station_count, f_storage_station_count, f_gasification_station_count, f_mixing_station_count, f_gas_station_count, f_filling_station_count, f_supply_station_count, f_pressure_station_count, f_other_station_count, f_create_time, f_update_time, is_report, f_year from t_sta_enterprise_infor
</sql> </sql>
<select id="selectTStaEnterpriseInforList" parameterType="com.zehong.system.domain.TStaEnterpriseInfor" resultMap="TStaEnterpriseInforResult"> <select id="selectTStaEnterpriseInforList" parameterType="com.zehong.system.domain.TStaEnterpriseInfor" resultMap="TStaEnterpriseInforResult">
...@@ -71,6 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -71,6 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fCreateTime != null "> and f_create_time = #{fCreateTime}</if> <if test="fCreateTime != null "> and f_create_time = #{fCreateTime}</if>
<if test="fUpdateTime != null "> and f_update_time = #{fUpdateTime}</if> <if test="fUpdateTime != null "> and f_update_time = #{fUpdateTime}</if>
<if test="isReport != null "> and is_report = #{isReport}</if> <if test="isReport != null "> and is_report = #{isReport}</if>
<if test="fYear != null "> and f_year = #{fYear}</if>
</where> </where>
</select> </select>
...@@ -110,6 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -110,6 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fCreateTime != null">f_create_time,</if> <if test="fCreateTime != null">f_create_time,</if>
<if test="fUpdateTime != null">f_update_time,</if> <if test="fUpdateTime != null">f_update_time,</if>
<if test="isReport != null">is_report,</if> <if test="isReport != null">is_report,</if>
<if test="fYear != null">f_year,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fCityName != null and fCityName != ''">#{fCityName},</if> <if test="fCityName != null and fCityName != ''">#{fCityName},</if>
...@@ -140,6 +143,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -140,6 +143,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fCreateTime != null">#{fCreateTime},</if> <if test="fCreateTime != null">#{fCreateTime},</if>
<if test="fUpdateTime != null">#{fUpdateTime},</if> <if test="fUpdateTime != null">#{fUpdateTime},</if>
<if test="isReport != null">#{isReport},</if> <if test="isReport != null">#{isReport},</if>
<if test="fYear != null">#{fYear},</if>
</trim> </trim>
</insert> </insert>
...@@ -174,6 +178,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -174,6 +178,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fCreateTime != null">f_create_time = #{fCreateTime},</if> <if test="fCreateTime != null">f_create_time = #{fCreateTime},</if>
<if test="fUpdateTime != null">f_update_time = #{fUpdateTime},</if> <if test="fUpdateTime != null">f_update_time = #{fUpdateTime},</if>
<if test="isReport != null">is_report = #{isReport},</if> <if test="isReport != null">is_report = #{isReport},</if>
<if test="fYear != null">f_year = #{fYear},</if>
</trim> </trim>
where f_enterprise_id = #{fEnterpriseId} where f_enterprise_id = #{fEnterpriseId}
</update> </update>
......
...@@ -23,6 +23,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -23,6 +23,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="calendarDate" column="f_calendar_date" /> <result property="calendarDate" column="f_calendar_date" />
<result property="fGovUploadStatus" column="f_gov_upload_status" /> <result property="fGovUploadStatus" column="f_gov_upload_status" />
<result property="fGovUploadTime" column="f_gov_upload_time" /> <result property="fGovUploadTime" column="f_gov_upload_time" />
<result property="township" column="township" />
<result property="fPlanYhq" column="f_plan_yhq" />
<result property="fApprYhq" column="f_appr_yhq" />
<result property="fSupGasYhq" column="f_sup_gas_yhq" />
<result property="fStorageYhq" column="f_storage_yhq" />
<result property="createTimeYear" column="createTimeYear" />
</resultMap> </resultMap>
<sql id="selectTSupBalGasSupVo"> <sql id="selectTSupBalGasSupVo">
...@@ -45,7 +51,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -45,7 +51,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sup.f_calendar_date, sup.f_calendar_date,
sup.f_gov_upload_status, sup.f_gov_upload_status,
sup.f_gov_upload_time, sup.f_gov_upload_time,
en.enterprise_name as enterpriseName en.enterprise_name as enterpriseName,
sup.township,
sup.f_plan_yhq,
sup.f_appr_yhq,
sup.f_sup_gas_yhq,
sup.f_storage_yhq
FROM FROM
t_sup_bal_gas_sup sup t_sup_bal_gas_sup sup
LEFT JOIN t_enterprise_info en ON sup.f_company_info_id = en.enterprise_id LEFT JOIN t_enterprise_info en ON sup.f_company_info_id = en.enterprise_id
...@@ -66,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -66,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="beginCurrentMonthDate != null and endCurrentMonthDate != null">and sup.f_calendar_date between #{beginCurrentMonthDate} and #{endCurrentMonthDate}</if> <if test="beginCurrentMonthDate != null and endCurrentMonthDate != null">and sup.f_calendar_date between #{beginCurrentMonthDate} and #{endCurrentMonthDate}</if>
<if test="fGovUploadStatus != null and fGovUploadStatus != ''"> and sup.f_gov_upload_status = #{fGovUploadStatus}</if> <if test="fGovUploadStatus != null and fGovUploadStatus != ''"> and sup.f_gov_upload_status = #{fGovUploadStatus}</if>
<if test="fGovUploadTime != null "> and sup.f_gov_upload_time = #{fGovUploadTime}</if> <if test="fGovUploadTime != null "> and sup.f_gov_upload_time = #{fGovUploadTime}</if>
<if test="township != null "> and sup.township = #{township}</if>
</where> </where>
order by create_time desc order by create_time desc
</select> </select>
...@@ -121,6 +133,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -121,6 +133,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="calendarDate != null">f_calendar_date,</if> <if test="calendarDate != null">f_calendar_date,</if>
<if test="fGovUploadStatus != null">f_gov_upload_status,</if> <if test="fGovUploadStatus != null">f_gov_upload_status,</if>
<if test="fGovUploadTime != null">f_gov_upload_time,</if> <if test="fGovUploadTime != null">f_gov_upload_time,</if>
<if test="township != null">township,</if>
<if test="fPlanYhq != null">f_plan_yhq,</if>
<if test="fApprYhq != null">f_appr_yhq,</if>
<if test="fSupGasYhq != null">f_sup_gas_yhq,</if>
<if test="fStorageYhq != null">f_storage_yhq,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fCompanyInfoId != null and fCompanyInfoId != ''">#{fCompanyInfoId},</if> <if test="fCompanyInfoId != null and fCompanyInfoId != ''">#{fCompanyInfoId},</if>
...@@ -140,6 +157,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -140,6 +157,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="calendarDate != null">#{calendarDate},</if> <if test="calendarDate != null">#{calendarDate},</if>
<if test="fGovUploadStatus != null">#{fGovUploadStatus},</if> <if test="fGovUploadStatus != null">#{fGovUploadStatus},</if>
<if test="fGovUploadTime != null">#{fGovUploadTime},</if> <if test="fGovUploadTime != null">#{fGovUploadTime},</if>
<if test="township != null">#{township},</if>
<if test="fPlanYhq != null">#{fPlanYhq},</if>
<if test="fApprYhq != null">#{fApprYhq},</if>
<if test="fSupGasYhq != null">#{fSupGasYhq},</if>
<if test="fStorageYhq != null">#{fStorageYhq},</if>
</trim> </trim>
</insert> </insert>
...@@ -163,6 +185,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -163,6 +185,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="calendarDate != null">f_calendar_date = #{calendarDate},</if> <if test="calendarDate != null">f_calendar_date = #{calendarDate},</if>
<if test="fGovUploadStatus != null">f_gov_upload_status = #{fGovUploadStatus},</if> <if test="fGovUploadStatus != null">f_gov_upload_status = #{fGovUploadStatus},</if>
<if test="fGovUploadTime != null">f_gov_upload_time = #{fGovUploadTime},</if> <if test="fGovUploadTime != null">f_gov_upload_time = #{fGovUploadTime},</if>
<if test="township != null">township = #{township},</if>
<if test="fPlanYhq != null">f_plan_yhq = #{fPlanYhq},</if>
<if test="fApprYhq != null">f_appr_yhq = #{fApprYhq},</if>
<if test="fSupGasYhq != null">f_sup_gas_yhq = #{fSupGasYhq},</if>
<if test="fStorageYhq != null">f_storage_yhq = #{fStorageYhq},</if>
</trim> </trim>
where f_gas_sup_id = #{fGasSupId} where f_gas_sup_id = #{fGasSupId}
</update> </update>
...@@ -182,4 +209,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -182,4 +209,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectTSupBalGasSupVo"/> <include refid="selectTSupBalGasSupVo"/>
where sup.f_company_info_id = #{companyId} and sup.f_calendar_date = #{calendarDate} where sup.f_company_info_id = #{companyId} and sup.f_calendar_date = #{calendarDate}
</select> </select>
<select id="queryAllByNotDeleteAndCreateTime" resultType="com.zehong.system.domain.TSupBalGasSup" resultMap="TSupBalGasSupResult">
select f_gas_sup_id, f_company_info_id, f_plan_quan, f_appr_quan, f_sup_gas_vol, f_storage_vol, f_sup_date, f_rep_status,
MONTH(f_rep_date) as createTimeYear, create_by, create_time, update_by, update_time, is_del, remarks, f_calendar_date, f_gov_upload_status,
f_gov_upload_time, township, f_plan_yhq, f_appr_yhq, f_sup_gas_yhq, f_storage_yhq
FROM t_sup_bal_gas_sup
where is_del = '0'
<if test="startOfMonth != null and endOfMonth != null">
and f_rep_date <![CDATA[>=]]> #{startOfMonth} and f_rep_date <![CDATA[<=]]> #{endOfMonth}
</if>
<if test="township != null and township != '' and township != 0 ">
and township = #{township}
</if>
order by create_time asc
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -33,6 +33,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -33,6 +33,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="fCalendarDate" column="f_calendar_date" /> <result property="fCalendarDate" column="f_calendar_date" />
<result property="fGovUploadStatus" column="f_gov_upload_status" /> <result property="fGovUploadStatus" column="f_gov_upload_status" />
<result property="fGovUploadTime" column="f_gov_upload_time" /> <result property="fGovUploadTime" column="f_gov_upload_time" />
<result property="township" column="township" />
<result property="createTimeYear" column="createTimeYear" />
</resultMap> </resultMap>
<sql id="selectTSupBalUsgDayVo"> <sql id="selectTSupBalUsgDayVo">
...@@ -65,7 +67,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -65,7 +67,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
da.f_calendar_date, da.f_calendar_date,
da.f_gov_upload_status, da.f_gov_upload_status,
da.f_gov_upload_time, da.f_gov_upload_time,
en.enterprise_name AS enterpriseName en.enterprise_name AS enterpriseName,
da.township
FROM FROM
t_sup_bal_usg_day da t_sup_bal_usg_day da
LEFT JOIN t_enterprise_info en ON en.enterprise_id = da.f_company_info_id LEFT JOIN t_enterprise_info en ON en.enterprise_id = da.f_company_info_id
...@@ -82,6 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -82,6 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="beginCurrentMonthDate != null and endCurrentMonthDate != null">and da.f_calendar_date between #{beginCurrentMonthDate} and #{endCurrentMonthDate}</if> <if test="beginCurrentMonthDate != null and endCurrentMonthDate != null">and da.f_calendar_date between #{beginCurrentMonthDate} and #{endCurrentMonthDate}</if>
<if test="fGovUploadStatus != null and fGovUploadStatus != ''"> and da.f_gov_upload_status = #{fGovUploadStatus}</if> <if test="fGovUploadStatus != null and fGovUploadStatus != ''"> and da.f_gov_upload_status = #{fGovUploadStatus}</if>
<if test="fGovUploadTime != null "> and da.f_gov_upload_time = #{fGovUploadTime}</if> <if test="fGovUploadTime != null "> and da.f_gov_upload_time = #{fGovUploadTime}</if>
<if test="township != null "> and da.township = #{township}</if>
</where> </where>
order by f_create_time desc order by f_create_time desc
</select> </select>
...@@ -121,6 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -121,6 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fCalendarDate != null">f_calendar_date,</if> <if test="fCalendarDate != null">f_calendar_date,</if>
<if test="fGovUploadStatus != null">f_gov_upload_status,</if> <if test="fGovUploadStatus != null">f_gov_upload_status,</if>
<if test="fGovUploadTime != null">f_gov_upload_time,</if> <if test="fGovUploadTime != null">f_gov_upload_time,</if>
<if test="township != null">township,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fCompanyInfoId != null and fCompanyInfoId != ''">#{fCompanyInfoId},</if> <if test="fCompanyInfoId != null and fCompanyInfoId != ''">#{fCompanyInfoId},</if>
...@@ -150,6 +155,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -150,6 +155,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fCalendarDate != null">#{fCalendarDate},</if> <if test="fCalendarDate != null">#{fCalendarDate},</if>
<if test="fGovUploadStatus != null">#{fGovUploadStatus},</if> <if test="fGovUploadStatus != null">#{fGovUploadStatus},</if>
<if test="fGovUploadTime != null">#{fGovUploadTime},</if> <if test="fGovUploadTime != null">#{fGovUploadTime},</if>
<if test="township != null">#{township},</if>
</trim> </trim>
</insert> </insert>
...@@ -183,6 +189,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -183,6 +189,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fCalendarDate != null">f_calendar_date = #{fCalendarDate},</if> <if test="fCalendarDate != null">f_calendar_date = #{fCalendarDate},</if>
<if test="fGovUploadStatus != null">f_gov_upload_status = #{fGovUploadStatus},</if> <if test="fGovUploadStatus != null">f_gov_upload_status = #{fGovUploadStatus},</if>
<if test="fGovUploadTime != null">f_gov_upload_time = #{fGovUploadTime},</if> <if test="fGovUploadTime != null">f_gov_upload_time = #{fGovUploadTime},</if>
<if test="township != null">township = #{township},</if>
</trim> </trim>
where f_rep_usg_day_id = #{fRepUsgDayId} where f_rep_usg_day_id = #{fRepUsgDayId}
</update> </update>
...@@ -202,4 +209,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -202,4 +209,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectTSupBalUsgDayVo"/> <include refid="selectTSupBalUsgDayVo"/>
where da.f_company_info_id = #{companyId} and da.f_calendar_date = #{calendarDate} where da.f_company_info_id = #{companyId} and da.f_calendar_date = #{calendarDate}
</select> </select>
<select id="queryAllByNotDeleteAndCreateTime" resultType="com.zehong.system.domain.TSupBalUsgDay" resultMap="TSupBalUsgDayResult">
select f_rep_usg_day_id, f_company_info_id, f_urban_gas_usage, f_rural_replace_residents_gas_usage, f_no_rural_replace_residents_gas_usage,
f_industrial_gas_usage, f_commercial_gas_usage, f_public_gas_usage, f_city_heating_gas_uasge, f_car_gas_usage, f_sold_gas_volume,
f_gas_usage, f_urban_lpg_usage, f_rural_lpg_usage, f_industrial_lpg_usage, f_commercial_lpg_usage, f_public_lpg_usage,
f_car_lpg_usage, f_sold_lpg_volume, f_lpg_usage, f_report_record, MONTH(f_report_time) as createTimeYear, f_create_time, f_update_time,
f_report_status, f_calendar_date, f_gov_upload_status, f_gov_upload_time, township
FROM t_sup_bal_usg_day
where 1=1
<if test="startOfMonth != null and endOfMonth != null">
and f_report_time <![CDATA[>=]]> #{startOfMonth} and f_report_time <![CDATA[<=]]> #{endOfMonth}
</if>
<if test="township != null and township != '' and township != 0 ">
and township = #{township}
</if>
order by f_create_time asc
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -75,3 +75,22 @@ export function reportSupBalGasSupRecInfo(query) { ...@@ -75,3 +75,22 @@ export function reportSupBalGasSupRecInfo(query) {
params: query params: query
}) })
} }
export function sentimentSummaryAnalysisMethodTableViews(query) {
return request({
url: '/supplyBalance/gas/sentimentSummaryAnalysisMethodTableViews' ,
method: 'get',
params: query
})
}
export function sentimentSummaryAnalysisExport(data) {
return request({
url: '/supplyBalance/gas/sentimentSummaryAnalysisExport' ,
method: 'post',
data: data,
responseType:'blob'
})
}
...@@ -82,6 +82,7 @@ ...@@ -82,6 +82,7 @@
<el-table-column label="统一社会信用代码" align="center" prop="fBizCode" /> <el-table-column label="统一社会信用代码" align="center" prop="fBizCode" />
<el-table-column label="企业名称" align="center" prop="fCompanyName" /> <el-table-column label="企业名称" align="center" prop="fCompanyName" />
<el-table-column label="管道燃气许可证号" align="center" prop="fPipelineCertCode" /> <el-table-column label="管道燃气许可证号" align="center" prop="fPipelineCertCode" />
<el-table-column label="年度" align="center" prop="fYear" />
<el-table-column label="创建时间" align="center" prop="fCreateTime" width="180"> <el-table-column label="创建时间" align="center" prop="fCreateTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.fCreateTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.fCreateTime, '{y}-{m}-{d}') }}</span>
...@@ -279,12 +280,12 @@ ...@@ -279,12 +280,12 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="创建时间" prop="fCreateTime"> <el-form-item label="年度" prop="fYear">
<el-date-picker clearable size="small" <el-date-picker clearable size="small"
v-model="form.fCreateTime" v-model="form.fYear"
type="date" type="year"
value-format="yyyy-MM-dd" value-format="yyyy"
placeholder="选择创建时间"> placeholder="选择年度">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -450,15 +451,8 @@ ...@@ -450,15 +451,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="创建时间"> <el-form-item label="年度">
<span>{{ parseTime(viewForm.fCreateTime, '{y}-{m}-{d}') }}</span> <span>{{ viewForm.fYear }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="更新时间">
<span>{{ parseTime(viewForm.fUpdateTime, '{y}-{m}-{d}') }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="液化石油气城镇居民用量(万立方米)"> <el-form-item label="液化石油气城镇居民用量()">
<span v-if="detailInfo.fUrbanLpgUsage">{{ detailInfo.fUrbanLpgUsage }}</span> <span v-if="detailInfo.fUrbanLpgUsage">{{ detailInfo.fUrbanLpgUsage }}</span>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
...@@ -142,6 +142,13 @@ ...@@ -142,6 +142,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="所属区域">
<span v-if="detailInfo.township">{{ $parent.townshipFormat(detailInfo) }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="创建时间"> <el-form-item label="创建时间">
<span v-if="detailInfo.fCreateTime">{{ detailInfo.fCreateTime }}</span> <span v-if="detailInfo.fCreateTime">{{ detailInfo.fCreateTime }}</span>
......
...@@ -478,6 +478,8 @@ export default { ...@@ -478,6 +478,8 @@ export default {
}, },
// 表单参数 // 表单参数
form: {}, form: {},
// 所属区域字典
townshipOptions: [],
// 表单校验 // 表单校验
rules: { rules: {
fGasUsage: [ fGasUsage: [
...@@ -499,6 +501,9 @@ export default { ...@@ -499,6 +501,9 @@ export default {
}; };
}, },
created() { created() {
this.getDicts("t_township").then(response => {
this.townshipOptions = response.data;
});
if(-2 == this.$store.state.user.enterpriseId){ if(-2 == this.$store.state.user.enterpriseId){
this.getList(); this.getList();
//return; //return;
...@@ -515,6 +520,10 @@ export default { ...@@ -515,6 +520,10 @@ export default {
this.getReportInfo(); this.getReportInfo();
}, },
methods: { methods: {
// 所属区域字典翻译
townshipFormat(row, column) {
return this.selectDictLabel(this.townshipOptions, row.township);
},
/** 查询供需平衡-企业每日填报列表 */ /** 查询供需平衡-企业每日填报列表 */
getList() { getList() {
this.loading = true; this.loading = true;
......
...@@ -11,33 +11,61 @@ ...@@ -11,33 +11,61 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="计划量/wm³"> <el-form-item label="天然气计划量/wm³">
<span v-if="detailInfo.fPlanQuan">{{ detailInfo.fPlanQuan }}</span> <span v-if="detailInfo.fPlanQuan">{{ detailInfo.fPlanQuan }}</span>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="批复量/wm³"> <el-form-item label="天然气批复量/wm³">
<span v-if="detailInfo.fApprQuan">{{ detailInfo.fApprQuan }}</span> <span v-if="detailInfo.fApprQuan">{{ detailInfo.fApprQuan }}</span>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="供气量/wm³"> <el-form-item label="天然气供气量/wm³">
<span v-if="detailInfo.fSupGasVol">{{ detailInfo.fSupGasVol }}</span> <span v-if="detailInfo.fSupGasVol">{{ detailInfo.fSupGasVol }}</span>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="存储量/wm³"> <el-form-item label="天然气存储量/wm³">
<span v-if="detailInfo.fStorageVol">{{ detailInfo.fStorageVol }}</span> <span v-if="detailInfo.fStorageVol">{{ detailInfo.fStorageVol }}</span>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="液化气计划量/吨">
<span v-if="detailInfo.fPlanYhq">{{ detailInfo.fPlanYhq }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="液化气批复量/吨">
<span v-if="detailInfo.fApprYhq">{{ detailInfo.fApprYhq }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="液化气供气量/吨">
<span v-if="detailInfo.fSupGasYhq">{{ detailInfo.fSupGasYhq }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="液化气存储量/吨">
<span v-if="detailInfo.fStorageYhq">{{ detailInfo.fStorageYhq }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="监管气量日期"> <el-form-item label="监管气量日期">
<span v-if="detailInfo.fSupDate">{{ detailInfo.fSupDate }}</span> <span v-if="detailInfo.fSupDate">{{ detailInfo.fSupDate }}</span>
...@@ -58,6 +86,13 @@ ...@@ -58,6 +86,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="所属区域">
<span v-if="detailInfo.township">{{ $parent.townshipFormat(detailInfo) }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="备注"> <el-form-item label="备注">
<span v-if="detailInfo.remarks">{{ detailInfo.remarks }}</span> <span v-if="detailInfo.remarks">{{ detailInfo.remarks }}</span>
......
...@@ -75,10 +75,14 @@ ...@@ -75,10 +75,14 @@
<el-table v-loading="loading" :data="supList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="supList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="企业名称" align="center" prop="enterpriseName" :show-overflow-tooltip="true"/> <el-table-column label="企业名称" align="center" prop="enterpriseName" :show-overflow-tooltip="true"/>
<el-table-column label="计划量/wm³" align="center" prop="fPlanQuan" /> <el-table-column label="天然气计划量/wm³" align="center" prop="fPlanQuan" />
<el-table-column label="批复量/wm³" align="center" prop="fApprQuan" /> <el-table-column label="天然气批复量/wm³" align="center" prop="fApprQuan" />
<el-table-column label="供气量/wm³" align="center" prop="fSupGasVol" /> <el-table-column label="天然气供气量/wm³" align="center" prop="fSupGasVol" />
<el-table-column label="存储量/wm³" align="center" prop="fStorageVol" /> <el-table-column label="天然气存储量/wm³" align="center" prop="fStorageVol" />
<el-table-column label="液化气计划量/吨" align="center" prop="fPlanYhq"/>
<el-table-column label="液化气批复量/吨" align="center" prop="fApprYhq"/>
<el-table-column label="液化气供气量/吨" align="center" prop="fSupGasYhq"/>
<el-table-column label="液化气存储量/吨" align="center" prop="fStorageYhq"/>
<el-table-column label="监管气量日期" align="center" prop="fSupDate" /> <el-table-column label="监管气量日期" align="center" prop="fSupDate" />
<el-table-column label="上报省厅状态" align="center" prop="fGovUploadStatus"> <el-table-column label="上报省厅状态" align="center" prop="fGovUploadStatus">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -138,17 +142,29 @@ ...@@ -138,17 +142,29 @@
<el-form-item label="企业uuid" prop="fCompanyInfoId"> <el-form-item label="企业uuid" prop="fCompanyInfoId">
<el-input v-model="form.fCompanyInfoId" placeholder="请输入企业uuid" /> <el-input v-model="form.fCompanyInfoId" placeholder="请输入企业uuid" />
</el-form-item> </el-form-item>
<el-form-item label="计划量" prop="fPlanQuan"> <el-form-item label="天然气计划量" prop="fPlanQuan">
<el-input v-model="form.fPlanQuan" placeholder="请输入计划量" /> <el-input v-model="form.fPlanQuan" placeholder="请输入天然气计划量" />
</el-form-item> </el-form-item>
<el-form-item label="批复量" prop="fApprQuan"> <el-form-item label="天然气批复量" prop="fApprQuan">
<el-input v-model="form.fApprQuan" placeholder="请输入批复量" /> <el-input v-model="form.fApprQuan" placeholder="请输入天然气批复量" />
</el-form-item> </el-form-item>
<el-form-item label="供气量" prop="fSupGasVol"> <el-form-item label="天然气供气量" prop="fSupGasVol">
<el-input v-model="form.fSupGasVol" placeholder="请输入供气量" /> <el-input v-model="form.fSupGasVol" placeholder="请输入天然气供气量" />
</el-form-item> </el-form-item>
<el-form-item label="存储量" prop="fStorageVol"> <el-form-item label="天然气存储量" prop="fStorageVol">
<el-input v-model="form.fStorageVol" placeholder="请输入存储量" /> <el-input v-model="form.fStorageVol" placeholder="请输入天然气存储量" />
</el-form-item>
<el-form-item label="液化气计划量" prop="fPlanYhq">
<el-input v-model="form.fPlanYhq" placeholder="请输入液化气计划量" />
</el-form-item>
<el-form-item label="液化气批复量" prop="fApprYhq">
<el-input v-model="form.fApprYhq" placeholder="请输入液化气批复量" />
</el-form-item>
<el-form-item label="液化气供气量" prop="fSupGasYhq">
<el-input v-model="form.fSupGasYhq" placeholder="请输入液化气供气量" />
</el-form-item>
<el-form-item label="液化气存储量" prop="fStorageYhq">
<el-input v-model="form.fStorageYhq" placeholder="请输入液化气存储量" />
</el-form-item> </el-form-item>
<el-form-item label="监管气量日期" prop="fSupDate"> <el-form-item label="监管气量日期" prop="fSupDate">
<el-input v-model="form.fSupDate" placeholder="请输入监管气量日期" /> <el-input v-model="form.fSupDate" placeholder="请输入监管气量日期" />
...@@ -229,26 +245,46 @@ ...@@ -229,26 +245,46 @@
</div> </div>
<el-form :rules="rules" label-position="top" label-width="80px" :model="reportForm"> <el-form :rules="rules" label-position="top" label-width="80px" :model="reportForm">
<el-form-item label="计划量" prop="fPlanQuan"> <el-form-item label="天然气计划量" prop="fPlanQuan">
<el-input v-model="reportForm.fPlanQuan"> <el-input v-model="reportForm.fPlanQuan">
<template slot="append">万立方</template> <template slot="append">万立方</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="批复量" prop="fApprQuan"> <el-form-item label="天然气批复量" prop="fApprQuan">
<el-input v-model="reportForm.fApprQuan"> <el-input v-model="reportForm.fApprQuan">
<template slot="append">万立方</template> <template slot="append">万立方</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="供气量" prop="fSupGasVol"> <el-form-item label="天然气供气量" prop="fSupGasVol">
<el-input v-model="reportForm.fSupGasVol"> <el-input v-model="reportForm.fSupGasVol">
<template slot="append">万立方</template> <template slot="append">万立方</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="存储量" prop="fStorageVol"> <el-form-item label="天然气存储量" prop="fStorageVol">
<el-input v-model="reportForm.fStorageVol"> <el-input v-model="reportForm.fStorageVol">
<template slot="append">万立方</template> <template slot="append">万立方</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="液化气计划量" prop="fPlanYhq">
<el-input v-model="reportForm.fPlanYhq">
<template slot="append"></template>
</el-input>
</el-form-item>
<el-form-item label="液化气批复量" prop="fApprYhq">
<el-input v-model="reportForm.fApprYhq">
<template slot="append"></template>
</el-input>
</el-form-item>
<el-form-item label="液化气供气量" prop="fSupGasYhq">
<el-input v-model="reportForm.fSupGasYhq">
<template slot="append"></template>
</el-input>
</el-form-item>
<el-form-item label="液化气存储量" prop="fStorageYhq">
<el-input v-model="reportForm.fStorageYhq">
<template slot="append"></template>
</el-input>
</el-form-item>
</el-form> </el-form>
</div> </div>
</el-col> </el-col>
...@@ -310,20 +346,34 @@ export default { ...@@ -310,20 +346,34 @@ export default {
}, },
// 表单参数 // 表单参数
form: {}, form: {},
// 所属区域字典
townshipOptions: [],
// 表单校验 // 表单校验
rules: { rules: {
fPlanQuan: [ fPlanQuan: [
{ required: true, message: "计划量不能为空", trigger: "blur" } { required: true, message: "天然气计划量不能为空", trigger: "blur" }
], ],
fApprQuan: [ fApprQuan: [
{ required: true, message: "批复量不能为空", trigger: "blur" } { required: true, message: "天然气批复量不能为空", trigger: "blur" }
], ],
fSupGasVol: [ fSupGasVol: [
{ required: true, message: "供气量不能为空", trigger: "blur" } { required: true, message: "天然气供气量不能为空", trigger: "blur" }
], ],
fStorageVol: [ fStorageVol: [
{ required: true, message: "存储量不能为空", trigger: "blur" } { required: true, message: "天然气存储量不能为空", trigger: "blur" }
],
fPlanYhq: [
{ required: true, message: "液化气计划量不能为空", trigger: "blur" }
], ],
fApprYhq: [
{ required: true, message: "液化气批复量不能为空", trigger: "blur" }
],
fSupGasYhq: [
{ required: true, message: "液化气供气量不能为空", trigger: "blur" }
],
fStorageYhq: [
{ required: true, message: "液化气存储量不能为空", trigger: "blur" }
]
}, },
reportDate: moment().format('YYYY-MM-DD'), reportDate: moment().format('YYYY-MM-DD'),
scheduleData:[ scheduleData:[
...@@ -337,6 +387,9 @@ export default { ...@@ -337,6 +387,9 @@ export default {
}; };
}, },
created() { created() {
this.getDicts("t_township").then(response => {
this.townshipOptions = response.data;
});
if(-2 == this.$store.state.user.enterpriseId){ if(-2 == this.$store.state.user.enterpriseId){
this.getList(); this.getList();
return; return;
...@@ -352,6 +405,10 @@ export default { ...@@ -352,6 +405,10 @@ export default {
this.getReportInfo(); this.getReportInfo();
}, },
methods: { methods: {
// 所属区域字典翻译
townshipFormat(row, column) {
return this.selectDictLabel(this.townshipOptions, row.township);
},
/** 查询气量监管列表 */ /** 查询气量监管列表 */
getList() { getList() {
this.loading = true; this.loading = true;
...@@ -375,6 +432,10 @@ export default { ...@@ -375,6 +432,10 @@ export default {
fApprQuan: null, fApprQuan: null,
fSupGasVol: null, fSupGasVol: null,
fStorageVol: null, fStorageVol: null,
fPlanYhq: null,
fApprYhq: null,
fSupGasYhq: null,
fStorageYhq: null,
fSupDate: null, fSupDate: null,
fRepStatus: null, fRepStatus: null,
fRepDate: null, fRepDate: null,
...@@ -396,6 +457,10 @@ export default { ...@@ -396,6 +457,10 @@ export default {
fApprQuan: null, fApprQuan: null,
fSupGasVol: null, fSupGasVol: null,
fStorageVol: null, fStorageVol: null,
fPlanYhq: null,
fApprYhq: null,
fSupGasYhq: null,
fStorageYhq: null,
fSupDate: null, fSupDate: null,
fRepStatus: null, fRepStatus: null,
fRepDate: null, fRepDate: null,
......
<template>
<div class="app-container">
<el-form :model="statisticalAnalysisForm" ref="statisticalAnalysisForm" :rules="rules" :inline="true">
<el-form-item label="年度" prop="date" >
<el-date-picker clearable size="small"
v-model="statisticalAnalysisForm.date"
type="year"
value-format="yyyy"
placeholder="请选择年度">
</el-date-picker>
</el-form-item>
<el-form-item label="所属区域" prop="township">
<el-select style="width: 100%" v-model="statisticalAnalysisForm.township" clearable size="small">
<el-option label="全部" value="0"/>
<el-option
v-for="dict in townshipOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button type="primary" icon="el-icon-search" size="mini"
@click="handleExport">导出</el-button>
</el-form-item>
</el-form>
<el-table style="width: 100%" border :data="summaryAnalysisDataList">
<el-table-column align="center" :label="dynamicTitle">
<el-table-column fixed prop="date" label="日期">
</el-table-column>
<el-table-column prop="supgasvolNum" label="天然气供气量">
</el-table-column>
<el-table-column prop="supgasuseNum" label="天然气用气量">
</el-table-column>
<el-table-column prop="supgasuseBalance" label="天然气供需差额">
</el-table-column>
<el-table-column prop="liqgasvolNum" label="液化气供气量">
</el-table-column>
<el-table-column prop="liqgasuseNum" label="液化气用气量">
</el-table-column>
<el-table-column prop="liqgasuseBalance" label="液化气供需差额">
</el-table-column>
</el-table-column>
</el-table>
</div>
</template>
<script>
import { sentimentSummaryAnalysisMethodTableViews,sentimentSummaryAnalysisExport } from "@/api/supplybalance/gas";
import axios from "axios";
export default {
name: "SupGasSummaryAnalysis",
data() {
return{
statisticalAnalysisForm:{
date: '',
township:''
},
// 所属乡镇字典
townshipOptions: [],
summaryAnalysisDataList:[],
dynamicTitle:"",
// 导出遮罩层
exportLoading: false,
rules: {
date: [
{ required: true, message: '请选择时间', trigger: 'change' }
]
}
}
},
mounted() {
},
computed: {
currentYear() {
return new Date().getFullYear().toString();
}
},
created(){
this.getDicts("t_township").then(response => {
this.townshipOptions = response.data;
});
this.statisticalAnalysisForm.date = this.currentYear;
this.statisticalAnalysisForm.township = '0';
this.dynamicTitle = this.statisticalAnalysisForm.date + "年度, 所属区域为全部统计分析数据"
sentimentSummaryAnalysisMethodTableViews(this.statisticalAnalysisForm).then(response => {
this.summaryAnalysisDataList = response.data;
})
},
methods:{
handleQuery(){
this.$refs.statisticalAnalysisForm.validate(valid => {
if (valid) {
let townshipValue = this.statisticalAnalysisForm.township;
if (townshipValue == '0') {
townshipValue = "全部"
} else{
townshipValue = this.selectDictLabel(this.townshipOptions, townshipValue)
}
this.dynamicTitle = this.statisticalAnalysisForm.date + "年度, 所属区域为" + townshipValue + "统计分析数据";
sentimentSummaryAnalysisMethodTableViews(this.statisticalAnalysisForm).then(response => {
this.summaryAnalysisDataList = response.data;
})
} else {
return false;
}
});
},
handleExport(){
const queryParams = this.statisticalAnalysisForm;
queryParams.dynamicTitle = this.dynamicTitle;
this.$confirm('是否确认导出?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
sentimentSummaryAnalysisExport(queryParams).then((response) => {
// console.log("res data = "+response.data);
// const str = response.headers["content-disposition"];
// console.log("response.headers = "+str);
let blob = new Blob([response], {type: 'application/vnd.ms-excel;charset=utf-8'}) // 文件类型
// console.log(response.headers['Content-disposition']); // 从response的headers中获取filename, 后端response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx") 设置的文件名;
//以=分割取数组[1]元素为文件名
// let filename = window.decodeURI(response.headers['Content-disposition'].split('=')[1])
let url = window.URL.createObjectURL(blob); // 创建下载链接
let aLink = document.createElement("a"); // 赋值给a标签的href属性
aLink.style.display = "none";
aLink.href = url;
aLink.setAttribute("download", "供需平衡汇总分析.xlsx");
document.body.appendChild(aLink); // 将a标签挂载上去
aLink.click(); // a标签click事件
document.body.removeChild(aLink); // 移除a标签
window.URL.revokeObjectURL(url); // 销毁下载链接
}).catch(error => {
console.error('导出失败', error);
});
}).catch(() => {});
},
exportExcel(){
}
}
}
</script>
...@@ -132,7 +132,7 @@ export default { ...@@ -132,7 +132,7 @@ export default {
let aLink = document.createElement("a"); // 赋值给a标签的href属性 let aLink = document.createElement("a"); // 赋值给a标签的href属性
aLink.style.display = "none"; aLink.style.display = "none";
aLink.href = url; aLink.href = url;
aLink.setAttribute("download", "投诉汇总分析.xlsx"); aLink.setAttribute("download", "舆情处置汇总分析.xlsx");
document.body.appendChild(aLink); // 将a标签挂载上去 document.body.appendChild(aLink); // 将a标签挂载上去
aLink.click(); // a标签click事件 aLink.click(); // a标签click事件
document.body.removeChild(aLink); // 移除a标签 document.body.removeChild(aLink); // 移除a标签
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment