Commit c69195a5 authored by zhangjianqian's avatar zhangjianqian

Merge remote-tracking branch 'origin/master'

parents 2c0b84bc 20eb5fb1
package com.zehong.web.controller.operationMonitor;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TInspectionResult;
import com.zehong.system.service.ITInspectionResultService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 巡检结果采集Controller
*
* @author zehong
* @date 2026-03-14
*/
@RestController
@RequestMapping("/inspection/result")
public class TInspectionResultController extends BaseController
{
@Autowired
private ITInspectionResultService tInspectionResultService;
/**
* 查询巡检结果采集列表
*/
@GetMapping("/list")
public TableDataInfo list(TInspectionResult tInspectionResult)
{
startPage();
List<TInspectionResult> list = tInspectionResultService.selectTInspectionResultList(tInspectionResult);
return getDataTable(list);
}
/**
* 导出巡检结果采集列表
*/
@Log(title = "巡检结果采集", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TInspectionResult tInspectionResult)
{
List<TInspectionResult> list = tInspectionResultService.selectTInspectionResultList(tInspectionResult);
ExcelUtil<TInspectionResult> util = new ExcelUtil<TInspectionResult>(TInspectionResult.class);
return util.exportExcel(list, "巡检结果采集数据");
}
/**
* 获取巡检结果采集详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tInspectionResultService.selectTInspectionResultById(id));
}
/**
* 新增巡检结果采集
*/
@Log(title = "巡检结果采集", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TInspectionResult tInspectionResult)
{
return toAjax(tInspectionResultService.insertTInspectionResult(tInspectionResult));
}
/**
* 修改巡检结果采集
*/
@Log(title = "巡检结果采集", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TInspectionResult tInspectionResult)
{
return toAjax(tInspectionResultService.updateTInspectionResult(tInspectionResult));
}
/**
* 删除巡检结果采集
*/
@Log(title = "巡检结果采集", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tInspectionResultService.deleteTInspectionResultByIds(ids));
}
}
\ No newline at end of file
...@@ -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);
}
} }
package com.zehong.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 巡检结果采集对象 t_inspection_result
*
* @author zehong
* @date 2026-03-14
*/
public class TInspectionResult extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 所属企业id */
private String enterpriseId;
/** 企业名称 */
@Excel(name = "企业名称")
private String enterpriseName;
/** 巡检月份 */
@Excel(name = "巡检月份")
private String inspectionMonth;
/** 名称 */
@Excel(name = "名称")
private String inspectionName;
/** 巡检类型(1,管道;2,设备设施) */
@Excel(name = "巡检类型(1,管道;2,设备设施)")
private String inspectionType;
/** 应巡数量 */
@Excel(name = "应巡数量")
private String shouldInspectionNum;
/** 已巡数量 */
@Excel(name = "已巡数量")
private String completeInspectionNum;
/** 异常数量 */
@Excel(name = "异常数量")
private String anomalyNum;
/** 已整改数量 */
@Excel(name = "已整改数量")
private String rectifyNum;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setEnterpriseId(String enterpriseId)
{
this.enterpriseId = enterpriseId;
}
public String getEnterpriseId()
{
return enterpriseId;
}
public void setEnterpriseName(String enterpriseName)
{
this.enterpriseName = enterpriseName;
}
public String getEnterpriseName()
{
return enterpriseName;
}
public void setInspectionMonth(String inspectionMonth)
{
this.inspectionMonth = inspectionMonth;
}
public String getInspectionMonth()
{
return inspectionMonth;
}
public void setInspectionName(String inspectionName)
{
this.inspectionName = inspectionName;
}
public String getInspectionName()
{
return inspectionName;
}
public void setInspectionType(String inspectionType)
{
this.inspectionType = inspectionType;
}
public String getInspectionType()
{
return inspectionType;
}
public void setShouldInspectionNum(String shouldInspectionNum)
{
this.shouldInspectionNum = shouldInspectionNum;
}
public String getShouldInspectionNum()
{
return shouldInspectionNum;
}
public void setCompleteInspectionNum(String completeInspectionNum)
{
this.completeInspectionNum = completeInspectionNum;
}
public String getCompleteInspectionNum()
{
return completeInspectionNum;
}
public void setAnomalyNum(String anomalyNum)
{
this.anomalyNum = anomalyNum;
}
public String getAnomalyNum()
{
return anomalyNum;
}
public void setRectifyNum(String rectifyNum)
{
this.rectifyNum = rectifyNum;
}
public String getRectifyNum()
{
return rectifyNum;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("enterpriseId", getEnterpriseId())
.append("enterpriseName", getEnterpriseName())
.append("inspectionMonth", getInspectionMonth())
.append("inspectionName", getInspectionName())
.append("inspectionType", getInspectionType())
.append("shouldInspectionNum", getShouldInspectionNum())
.append("completeInspectionNum", getCompleteInspectionNum())
.append("anomalyNum", getAnomalyNum())
.append("rectifyNum", getRectifyNum())
.append("createTime", getCreateTime())
.toString();
}
}
\ No newline at end of file
...@@ -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;
import java.util.List;
import com.zehong.system.domain.TInspectionResult;
/**
* 巡检结果采集Mapper接口
*
* @author zehong
* @date 2026-03-14
*/
public interface TInspectionResultMapper
{
/**
* 查询巡检结果采集
*
* @param id 巡检结果采集ID
* @return 巡检结果采集
*/
public TInspectionResult selectTInspectionResultById(Long id);
/**
* 查询巡检结果采集列表
*
* @param tInspectionResult 巡检结果采集
* @return 巡检结果采集集合
*/
public List<TInspectionResult> selectTInspectionResultList(TInspectionResult tInspectionResult);
/**
* 新增巡检结果采集
*
* @param tInspectionResult 巡检结果采集
* @return 结果
*/
public int insertTInspectionResult(TInspectionResult tInspectionResult);
/**
* 修改巡检结果采集
*
* @param tInspectionResult 巡检结果采集
* @return 结果
*/
public int updateTInspectionResult(TInspectionResult tInspectionResult);
/**
* 删除巡检结果采集
*
* @param id 巡检结果采集ID
* @return 结果
*/
public int deleteTInspectionResultById(Long id);
/**
* 批量删除巡检结果采集
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteTInspectionResultByIds(Long[] ids);
}
\ No newline at end of file
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;
import java.util.List;
import com.zehong.system.domain.TInspectionResult;
/**
* 巡检结果采集Service接口
*
* @author zehong
* @date 2026-03-14
*/
public interface ITInspectionResultService
{
/**
* 查询巡检结果采集
*
* @param id 巡检结果采集ID
* @return 巡检结果采集
*/
public TInspectionResult selectTInspectionResultById(Long id);
/**
* 查询巡检结果采集列表
*
* @param tInspectionResult 巡检结果采集
* @return 巡检结果采集集合
*/
public List<TInspectionResult> selectTInspectionResultList(TInspectionResult tInspectionResult);
/**
* 新增巡检结果采集
*
* @param tInspectionResult 巡检结果采集
* @return 结果
*/
public int insertTInspectionResult(TInspectionResult tInspectionResult);
/**
* 修改巡检结果采集
*
* @param tInspectionResult 巡检结果采集
* @return 结果
*/
public int updateTInspectionResult(TInspectionResult tInspectionResult);
/**
* 批量删除巡检结果采集
*
* @param ids 需要删除的巡检结果采集ID
* @return 结果
*/
public int deleteTInspectionResultByIds(Long[] ids);
/**
* 删除巡检结果采集信息
*
* @param id 巡检结果采集ID
* @return 结果
*/
public int deleteTInspectionResultById(Long id);
}
\ No newline at end of file
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;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TInspectionResultMapper;
import com.zehong.system.domain.TInspectionResult;
import com.zehong.system.service.ITInspectionResultService;
/**
* 巡检结果采集Service业务层处理
*
* @author zehong
* @date 2026-03-14
*/
@Service
public class TInspectionResultServiceImpl implements ITInspectionResultService
{
@Autowired
private TInspectionResultMapper tInspectionResultMapper;
/**
* 查询巡检结果采集
*
* @param id 巡检结果采集ID
* @return 巡检结果采集
*/
@Override
public TInspectionResult selectTInspectionResultById(Long id)
{
return tInspectionResultMapper.selectTInspectionResultById(id);
}
/**
* 查询巡检结果采集列表
*
* @param tInspectionResult 巡检结果采集
* @return 巡检结果采集
*/
@Override
public List<TInspectionResult> selectTInspectionResultList(TInspectionResult tInspectionResult)
{
return tInspectionResultMapper.selectTInspectionResultList(tInspectionResult);
}
/**
* 新增巡检结果采集
*
* @param tInspectionResult 巡检结果采集
* @return 结果
*/
@Override
public int insertTInspectionResult(TInspectionResult tInspectionResult)
{
tInspectionResult.setCreateTime(DateUtils.getNowDate());
return tInspectionResultMapper.insertTInspectionResult(tInspectionResult);
}
/**
* 修改巡检结果采集
*
* @param tInspectionResult 巡检结果采集
* @return 结果
*/
@Override
public int updateTInspectionResult(TInspectionResult tInspectionResult)
{
return tInspectionResultMapper.updateTInspectionResult(tInspectionResult);
}
/**
* 批量删除巡检结果采集
*
* @param ids 需要删除的巡检结果采集ID
* @return 结果
*/
@Override
public int deleteTInspectionResultByIds(Long[] ids)
{
return tInspectionResultMapper.deleteTInspectionResultByIds(ids);
}
/**
* 删除巡检结果采集信息
*
* @param id 巡检结果采集ID
* @return 结果
*/
@Override
public int deleteTInspectionResultById(Long id)
{
return tInspectionResultMapper.deleteTInspectionResultById(id);
}
}
\ No newline at end of file
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);
}
/** /**
* 判断是否为政府角色 * 判断是否为政府角色
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.TInspectionResultMapper">
<resultMap type="com.zehong.system.domain.TInspectionResult" id="TInspectionResultResult">
<result property="id" column="id" />
<result property="enterpriseId" column="enterprise_id" />
<result property="enterpriseName" column="enterprise_name" />
<result property="inspectionMonth" column="inspection_month" />
<result property="inspectionName" column="inspection_name" />
<result property="inspectionType" column="inspection_type" />
<result property="shouldInspectionNum" column="should_inspection_num" />
<result property="completeInspectionNum" column="complete_inspection_num" />
<result property="anomalyNum" column="anomaly_num" />
<result property="rectifyNum" column="rectify_num" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectTInspectionResultVo">
select id, enterprise_id, enterprise_name, inspection_month, inspection_name, inspection_type, should_inspection_num, complete_inspection_num, anomaly_num, rectify_num, create_time from t_inspection_result
</sql>
<select id="selectTInspectionResultList" parameterType="com.zehong.system.domain.TInspectionResult" resultMap="TInspectionResultResult">
<include refid="selectTInspectionResultVo"/>
<where>
<if test="enterpriseId != null and enterpriseId != ''"> and enterprise_id = #{enterpriseId}</if>
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="inspectionMonth != null and inspectionMonth != ''"> and inspection_month = #{inspectionMonth}</if>
<if test="inspectionName != null and inspectionName != ''"> and inspection_name like concat('%', #{inspectionName}, '%')</if>
<if test="inspectionType != null and inspectionType != ''"> and inspection_type = #{inspectionType}</if>
<if test="shouldInspectionNum != null and shouldInspectionNum != ''"> and should_inspection_num = #{shouldInspectionNum}</if>
<if test="completeInspectionNum != null and completeInspectionNum != ''"> and complete_inspection_num = #{completeInspectionNum}</if>
<if test="anomalyNum != null and anomalyNum != ''"> and anomaly_num = #{anomalyNum}</if>
<if test="rectifyNum != null and rectifyNum != ''"> and rectify_num = #{rectifyNum}</if>
</where>
</select>
<select id="selectTInspectionResultById" parameterType="Long" resultMap="TInspectionResultResult">
<include refid="selectTInspectionResultVo"/>
where id = #{id}
</select>
<insert id="insertTInspectionResult" parameterType="com.zehong.system.domain.TInspectionResult" useGeneratedKeys="true" keyProperty="id">
insert into t_inspection_result
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="enterpriseId != null">enterprise_id,</if>
<if test="enterpriseName != null">enterprise_name,</if>
<if test="inspectionMonth != null">inspection_month,</if>
<if test="inspectionName != null">inspection_name,</if>
<if test="inspectionType != null">inspection_type,</if>
<if test="shouldInspectionNum != null">should_inspection_num,</if>
<if test="completeInspectionNum != null">complete_inspection_num,</if>
<if test="anomalyNum != null">anomaly_num,</if>
<if test="rectifyNum != null">rectify_num,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseId != null">#{enterpriseId},</if>
<if test="enterpriseName != null">#{enterpriseName},</if>
<if test="inspectionMonth != null">#{inspectionMonth},</if>
<if test="inspectionName != null">#{inspectionName},</if>
<if test="inspectionType != null">#{inspectionType},</if>
<if test="shouldInspectionNum != null">#{shouldInspectionNum},</if>
<if test="completeInspectionNum != null">#{completeInspectionNum},</if>
<if test="anomalyNum != null">#{anomalyNum},</if>
<if test="rectifyNum != null">#{rectifyNum},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateTInspectionResult" parameterType="com.zehong.system.domain.TInspectionResult">
update t_inspection_result
<trim prefix="SET" suffixOverrides=",">
<if test="enterpriseId != null">enterprise_id = #{enterpriseId},</if>
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
<if test="inspectionMonth != null">inspection_month = #{inspectionMonth},</if>
<if test="inspectionName != null">inspection_name = #{inspectionName},</if>
<if test="inspectionType != null">inspection_type = #{inspectionType},</if>
<if test="shouldInspectionNum != null">should_inspection_num = #{shouldInspectionNum},</if>
<if test="completeInspectionNum != null">complete_inspection_num = #{completeInspectionNum},</if>
<if test="anomalyNum != null">anomaly_num = #{anomalyNum},</if>
<if test="rectifyNum != null">rectify_num = #{rectifyNum},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTInspectionResultById" parameterType="Long">
delete from t_inspection_result where id = #{id}
</delete>
<delete id="deleteTInspectionResultByIds" parameterType="String">
delete from t_inspection_result where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
...@@ -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
import request from '@/utils/request'
// 查询巡检结果采集列表
export function listResult(query) {
return request({
url: '/inspection/result/list',
method: 'get',
params: query
})
}
// 查询巡检结果采集详细
export function getResult(id) {
return request({
url: '/inspection/result/' + id,
method: 'get'
})
}
// 新增巡检结果采集
export function addResult(data) {
return request({
url: '/inspection/result',
method: 'post',
data: data
})
}
// 修改巡检结果采集
export function updateResult(data) {
return request({
url: '/inspection/result',
method: 'put',
data: data
})
}
// 删除巡检结果采集
export function delResult(id) {
return request({
url: '/inspection/result/' + id,
method: 'delete'
})
}
// 导出巡检结果采集
export function exportResult(query) {
return request({
url: '/inspection/result/export',
method: 'get',
params: query
})
}
...@@ -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'
})
}
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="企业名称" prop="enterpriseName">
<el-input
v-model="queryParams.enterpriseName"
placeholder="请输入企业名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="巡检月份" prop="inspectionMonth">
<el-date-picker clearable size="small" v-model="queryParams.inspectionMonth" type="month" placeholder="请选择巡检月份" value-format="yyyy-MM" />
</el-form-item>
<el-form-item label="名称" prop="inspectionName">
<el-input
v-model="queryParams.inspectionName"
placeholder="请输入名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="巡检类型" prop="inspectionType">
<el-select v-model="queryParams.inspectionType" placeholder="请选择巡检类型" clearable size="small">
<el-option label="管道" value="1" />
<el-option label="设备设施" value="2" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除</el-button>
</el-col>-->
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
:loading="exportLoading"
@click="handleExport"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="resultList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="企业名称" align="center" prop="enterpriseName" />
<el-table-column label="巡检月份" align="center" prop="inspectionMonth" />
<el-table-column label="名称" align="center" prop="inspectionName" />
<el-table-column label="巡检类型" align="center" prop="inspectionType">
<template slot-scope="scope">
<span v-if="scope.row.inspectionType == 1">管道</span>
<span v-if="scope.row.inspectionType == 2">设备设施</span>
</template>
</el-table-column>
<el-table-column label="应巡数量" align="center" prop="shouldInspectionNum" />
<el-table-column label="已巡数量" align="center" prop="completeInspectionNum" />
<el-table-column label="异常数量" align="center" prop="anomalyNum" />
<el-table-column label="已整改数量" align="center" prop="rectifyNum" />
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除</el-button>
</template>
</el-table-column>-->
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改巡检结果采集对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="所属企业id" prop="enterpriseId">
<el-input v-model="form.enterpriseId" placeholder="请输入所属企业id" />
</el-form-item>
<el-form-item label="企业名称" prop="enterpriseName">
<el-input v-model="form.enterpriseName" placeholder="请输入企业名称" />
</el-form-item>
<el-form-item label="巡检月份" prop="inspectionMonth">
<el-input v-model="form.inspectionMonth" placeholder="请输入巡检月份" />
</el-form-item>
<el-form-item label="名称" prop="inspectionName">
<el-input v-model="form.inspectionName" placeholder="请输入名称" />
</el-form-item>
<el-form-item label="巡检类型(1,管道;2,设备设施)" prop="inspectionType">
<el-select v-model="form.inspectionType" placeholder="请选择巡检类型(1,管道;2,设备设施)">
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
<el-form-item label="应巡数量" prop="shouldInspectionNum">
<el-input v-model="form.shouldInspectionNum" placeholder="请输入应巡数量" />
</el-form-item>
<el-form-item label="已巡数量" prop="completeInspectionNum">
<el-input v-model="form.completeInspectionNum" placeholder="请输入已巡数量" />
</el-form-item>
<el-form-item label="异常数量" prop="anomalyNum">
<el-input v-model="form.anomalyNum" placeholder="请输入异常数量" />
</el-form-item>
<el-form-item label="已整改数量" prop="rectifyNum">
<el-input v-model="form.rectifyNum" placeholder="请输入已整改数量" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listResult, getResult, delResult, addResult, updateResult, exportResult } from "@/api/operationMonitor/inspectionResult";
export default {
name: "InspectionResult",
components: {
},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 巡检结果采集表格数据
resultList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
enterpriseId: null,
enterpriseName: null,
inspectionMonth: null,
inspectionName: null,
inspectionType: null,
shouldInspectionNum: null,
completeInspectionNum: null,
anomalyNum: null,
rectifyNum: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询巡检结果采集列表 */
getList() {
this.loading = true;
console.log("查询参数",this.queryParams);
listResult(this.queryParams).then(response => {
this.resultList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
enterpriseId: null,
enterpriseName: null,
inspectionMonth: null,
inspectionName: null,
inspectionType: null,
shouldInspectionNum: null,
completeInspectionNum: null,
anomalyNum: null,
rectifyNum: null,
createTime: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加巡检结果采集";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getResult(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改巡检结果采集";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateResult(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addResult(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm('是否确认删除巡检结果采集编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delResult(ids);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有巡检结果采集数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportResult(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>
...@@ -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